<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/* asn1x509-2.1.21.js (c) 2013-2022 Kenji Urushima | kjur.github.io/jsrsasign/license
<span class='line'>  2</span>  */</span><span class="WHIT">
<span class='line'>  3</span> </span><span class="COMM">/*
<span class='line'>  4</span>  * asn1x509.js - ASN.1 DER encoder classes for X.509 certificate
<span class='line'>  5</span>  *
<span class='line'>  6</span>  * Copyright (c) 2013-2023 Kenji Urushima (kenji.urushima@gmail.com)
<span class='line'>  7</span>  *
<span class='line'>  8</span>  * This software is licensed under the terms of the MIT License.
<span class='line'>  9</span>  * https://kjur.github.io/jsrsasign/license
<span class='line'> 10</span>  *
<span class='line'> 11</span>  * The above copyright and license notice shall be
<span class='line'> 12</span>  * included in all copies or substantial portions of the Software.
<span class='line'> 13</span>  */</span><span class="WHIT">
<span class='line'> 14</span> 
<span class='line'> 15</span> </span><span class="COMM">/**
<span class='line'> 16</span>  * @fileOverview
<span class='line'> 17</span>  * @name asn1x509-1.0.js
<span class='line'> 18</span>  * @author Kenji Urushima kenji.urushima@gmail.com
<span class='line'> 19</span>  * @version jsrsasign 10.9.0 asn1x509 2.1.21 (2023-Nov-27)
<span class='line'> 20</span>  * @since jsrsasign 2.1
<span class='line'> 21</span>  * @license &lt;a href="https://kjur.github.io/jsrsasign/license/">MIT License&lt;/a>
<span class='line'> 22</span>  */</span><span class="WHIT">
<span class='line'> 23</span> 
<span class='line'> 24</span> </span><span class="COMM">/**
<span class='line'> 25</span>  * kjur's class library name space
<span class='line'> 26</span>  * // already documented in asn1-1.0.js
<span class='line'> 27</span>  * @name KJUR
<span class='line'> 28</span>  * @namespace kjur's class library name space
<span class='line'> 29</span>  */</span><span class="WHIT">
<span class='line'> 30</span> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">KJUR</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 31</span> 
<span class='line'> 32</span> </span><span class="COMM">/**
<span class='line'> 33</span>  * kjur's ASN.1 class library name space
<span class='line'> 34</span>  * // already documented in asn1-1.0.js
<span class='line'> 35</span>  * @name KJUR.asn1
<span class='line'> 36</span>  * @namespace
<span class='line'> 37</span>  */</span><span class="WHIT">
<span class='line'> 38</span> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">KJUR.asn1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 39</span> 
<span class='line'> 40</span> </span><span class="COMM">/**
<span class='line'> 41</span>  * kjur's ASN.1 class for X.509 certificate library name space
<span class='line'> 42</span>  * &lt;p>
<span class='line'> 43</span>  * &lt;h4>FEATURES&lt;/h4>
<span class='line'> 44</span>  * &lt;ul>
<span class='line'> 45</span>  * &lt;li>easily issue any kind of certificate&lt;/li>
<span class='line'> 46</span>  * &lt;li>APIs are very similar to BouncyCastle library ASN.1 classes. So easy to learn.&lt;/li>
<span class='line'> 47</span>  * &lt;/ul>
<span class='line'> 48</span>  * &lt;/p>
<span class='line'> 49</span>  * &lt;h4>PROVIDED CLASSES&lt;/h4>
<span class='line'> 50</span>  * &lt;ul>
<span class='line'> 51</span>  * &lt;li>{@link KJUR.asn1.x509.Certificate}&lt;/li>
<span class='line'> 52</span>  * &lt;li>{@link KJUR.asn1.x509.TBSCertificate}&lt;/li>
<span class='line'> 53</span>  * &lt;li>{@link KJUR.asn1.x509.Extension} abstract class&lt;/li>
<span class='line'> 54</span>  * &lt;li>{@link KJUR.asn1.x509.Extensions}&lt;/li>
<span class='line'> 55</span>  * &lt;li>{@link KJUR.asn1.x509.SubjectPublicKeyInfo}&lt;/li>
<span class='line'> 56</span>  * &lt;li>{@link KJUR.asn1.x509.AlgorithmIdentifier}&lt;/li>
<span class='line'> 57</span>  * &lt;li>{@link KJUR.asn1.x509.GeneralNames}&lt;/li>
<span class='line'> 58</span>  * &lt;li>{@link KJUR.asn1.x509.GeneralName}&lt;/li>
<span class='line'> 59</span>  * &lt;li>{@link KJUR.asn1.x509.X500Name}&lt;/li>
<span class='line'> 60</span>  * &lt;li>{@link KJUR.asn1.x509.RDN}&lt;/li>
<span class='line'> 61</span>  * &lt;li>{@link KJUR.asn1.x509.AttributeTypeAndValue}&lt;/li>
<span class='line'> 62</span>  * &lt;li>{@link KJUR.asn1.x509.DistributionPointName}&lt;/li>
<span class='line'> 63</span>  * &lt;li>{@link KJUR.asn1.x509.DistributionPoint}&lt;/li>
<span class='line'> 64</span>  * &lt;li>{@link KJUR.asn1.x509.PolicyInformation}&lt;/li>
<span class='line'> 65</span>  * &lt;li>{@link KJUR.asn1.x509.PolicyQualifierInfo}&lt;/li>
<span class='line'> 66</span>  * &lt;li>{@link KJUR.asn1.x509.UserNotice}&lt;/li>
<span class='line'> 67</span>  * &lt;li>{@link KJUR.asn1.x509.NoticeReference}&lt;/li>
<span class='line'> 68</span>  * &lt;li>{@link KJUR.asn1.x509.DisplayText}&lt;/li>
<span class='line'> 69</span>  * &lt;li>{@link KJUR.asn1.x509.GeneralSubtree}&lt;/li>
<span class='line'> 70</span>  * &lt;li>{@link KJUR.asn1.x509.CRL}&lt;/li>
<span class='line'> 71</span>  * &lt;li>{@link KJUR.asn1.x509.TBSCertList}&lt;/li>
<span class='line'> 72</span>  * &lt;li>{@link KJUR.asn1.x509.CRLEntry} (DEPRECATED)&lt;/li>
<span class='line'> 73</span>  * &lt;li>{@link KJUR.asn1.x509.OID}&lt;/li>
<span class='line'> 74</span>  * &lt;/ul>
<span class='line'> 75</span>  * &lt;h4>SUPPORTED EXTENSIONS&lt;/h4>
<span class='line'> 76</span>  * &lt;ul>
<span class='line'> 77</span>  * &lt;li>{@link KJUR.asn1.x509.AuthorityKeyIdentifier}&lt;/li>
<span class='line'> 78</span>  * &lt;li>{@link KJUR.asn1.x509.SubjectKeyIdentifier}&lt;/li>
<span class='line'> 79</span>  * &lt;li>{@link KJUR.asn1.x509.KeyUsage}&lt;/li>
<span class='line'> 80</span>  * &lt;li>{@link KJUR.asn1.x509.CertificatePolicies}&lt;/li>
<span class='line'> 81</span>  * &lt;li>{@link KJUR.asn1.x509.PolicyMappings} 2.5.29.33&lt;/li>
<span class='line'> 82</span>  * &lt;li>{@link KJUR.asn1.x509.PolicyConstraints} 2.5.29.36&lt;/li>
<span class='line'> 83</span>  * &lt;li>{@link KJUR.asn1.x509.InhibitAnyPolicy} 2.5.29.54&lt;/li>
<span class='line'> 84</span>  * &lt;li>{@link KJUR.asn1.x509.SubjectAltName}&lt;/li>
<span class='line'> 85</span>  * &lt;li>{@link KJUR.asn1.x509.IssuerAltName}&lt;/li>
<span class='line'> 86</span>  * &lt;li>{@link KJUR.asn1.x509.BasicConstraints}&lt;/li>
<span class='line'> 87</span>  * &lt;li>{@link KJUR.asn1.x509.NameConstraints}&lt;/li>
<span class='line'> 88</span>  * &lt;li>{@link KJUR.asn1.x509.ExtKeyUsage}&lt;/li>
<span class='line'> 89</span>  * &lt;li>{@link KJUR.asn1.x509.CRLDistributionPoints}&lt;/li>
<span class='line'> 90</span>  * &lt;li>{@link KJUR.asn1.x509.AuthorityInfoAccess}&lt;/li>
<span class='line'> 91</span>  * &lt;li>{@link KJUR.asn1.x509.CRLNumber}&lt;/li>
<span class='line'> 92</span>  * &lt;li>{@link KJUR.asn1.x509.CRLReason}&lt;/li>
<span class='line'> 93</span>  * &lt;li>{@link KJUR.asn1.x509.OCSPNonce}&lt;/li>
<span class='line'> 94</span>  * &lt;li>{@link KJUR.asn1.x509.OCSPNoCheck}&lt;/li>
<span class='line'> 95</span>  * &lt;li>{@link KJUR.asn1.x509.AdobeTimeStamp}&lt;/li>
<span class='line'> 96</span>  * &lt;li>{@link KJUR.asn1.x509.SubjectDirectoryAttributes}&lt;/li>
<span class='line'> 97</span>  * &lt;li>{@link KJUR.asn1.x509.PrivateExtension}&lt;/li>
<span class='line'> 98</span>  * &lt;/ul>
<span class='line'> 99</span>  * NOTE1: Please ignore method summary and document of this namespace. This caused by a bug of jsdoc2.&lt;br/>
<span class='line'>100</span>  * NOTE2: SubjectAltName and IssuerAltName supported since 
<span class='line'>101</span>  * jsrsasign 6.2.3 asn1x509 1.0.19.&lt;br/>
<span class='line'>102</span>  * NOTE3: CeritifcatePolicies supported supported since
<span class='line'>103</span>  * jsrsasign 8.0.23 asn1x509 1.1.12&lt;br/>
<span class='line'>104</span>  * @name KJUR.asn1.x509
<span class='line'>105</span>  * @namespace
<span class='line'>106</span>  */</span><span class="WHIT">
<span class='line'>107</span> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">KJUR.asn1.x509</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>108</span> 
<span class='line'>109</span> </span><span class="COMM">// === BEGIN Certificate ===================================================</span><span class="WHIT">
<span class='line'>110</span> 
<span class='line'>111</span> </span><span class="COMM">/**
<span class='line'>112</span>  * X.509 Certificate class to sign and generate hex encoded certificate
<span class='line'>113</span>  * @name KJUR.asn1.x509.Certificate
<span class='line'>114</span>  * @class X.509 Certificate class to sign and generate hex encoded certificate
<span class='line'>115</span>  * @property {Array} params JSON object of parameters
<span class='line'>116</span>  * @param {Array} params JSON object for Certificate parameters
<span class='line'>117</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>118</span>  * @description
<span class='line'>119</span>  * &lt;br/>
<span class='line'>120</span>  * This class provides Certificate ASN.1 class structure
<span class='line'>121</span>  * defined in 
<span class='line'>122</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.1">
<span class='line'>123</span>  * RFC 5280 4.1&lt;/a>.
<span class='line'>124</span>  * &lt;pre>
<span class='line'>125</span>  * Certificate  ::=  SEQUENCE  {
<span class='line'>126</span>  *      tbsCertificate       TBSCertificate,
<span class='line'>127</span>  *      signatureAlgorithm   AlgorithmIdentifier,
<span class='line'>128</span>  *      signatureValue       BIT STRING  }
<span class='line'>129</span>  * &lt;/pre>
<span class='line'>130</span>  * Parameter "params" JSON object can be
<span class='line'>131</span>  * the same as {@link KJUR.asn1.x509.TBSCertificate}. 
<span class='line'>132</span>  * Then they are used to generate TBSCertificate.
<span class='line'>133</span>  * Additionally just for Certificate, following parameters can be used:
<span class='line'>134</span>  * &lt;ul>
<span class='line'>135</span>  * &lt;li>{TBSCertfificate}tbsobj - 
<span class='line'>136</span>  * specifies {@link KJUR.asn1.x509.TBSCertificate} 
<span class='line'>137</span>  * object to be signed if needed. 
<span class='line'>138</span>  * When this isn't specified, 
<span class='line'>139</span>  * this will be set from other parametes of TBSCertificate.&lt;/li>
<span class='line'>140</span>  * &lt;li>{Object}cakey (OPTION) - specifies certificate signing private key.
<span class='line'>141</span>  * Parameter "cakey" or "sighex" shall be specified. Following
<span class='line'>142</span>  * values can be specified:
<span class='line'>143</span>  *   &lt;ul>
<span class='line'>144</span>  *   &lt;li>PKCS#1/5 or PKCS#8 PEM string of private key&lt;/li>
<span class='line'>145</span>  *   &lt;li>RSAKey/DSA/ECDSA key object. {@link KEYUTIL.getKey} is useful
<span class='line'>146</span>  *   to generate a key object.&lt;/li>
<span class='line'>147</span>  *   &lt;/ul>
<span class='line'>148</span>  * &lt;/li>
<span class='line'>149</span>  * &lt;li>{String}sighex (OPTION) - hexadecimal string of signature value
<span class='line'>150</span>  * (i.e. ASN.1 value(V) of signatureValue BIT STRING without
<span class='line'>151</span>  * unused bits)&lt;/li>
<span class='line'>152</span>  * &lt;/ul>
<span class='line'>153</span>  * CAUTION: APIs of this class have been totally updated without
<span class='line'>154</span>  * backward compatibility since jsrsasign 9.0.0.&lt;br/>
<span class='line'>155</span>  * NOTE1: 'params' can be omitted.&lt;br/>
<span class='line'>156</span>  * NOTE2: DSA/ECDSA is also supported for CA signging key from asn1x509 1.0.6.
<span class='line'>157</span>  * @example
<span class='line'>158</span>  * var cert = new KJUR.asn1.x509.Certificate({
<span class='line'>159</span>  *  version: 3,
<span class='line'>160</span>  *  serial: {hex: "1234..."},
<span class='line'>161</span>  *  sigalg: "SHA256withRSAandMGF1",
<span class='line'>162</span>  *  ...
<span class='line'>163</span>  *  sighex: "1d3f..." // sign() method won't be called
<span class='line'>164</span>  * });
<span class='line'>165</span>  *
<span class='line'>166</span>  * // sighex will by calculated by signing with cakey
<span class='line'>167</span>  * var cert = new KJUR.asn1.x509.Certificate({
<span class='line'>168</span>  *  version: 3,
<span class='line'>169</span>  *  serial: {hex: "2345..."},
<span class='line'>170</span>  *  sigalg: "SHA256withRSA",
<span class='line'>171</span>  *  ...
<span class='line'>172</span>  *  cakey: "-----BEGIN PRIVATE KEY..."
<span class='line'>173</span>  * });
<span class='line'>174</span>  *
<span class='line'>175</span>  * // use TBSCertificate object to sign
<span class='line'>176</span>  * var cert = new KJUR.asn1.x509.Certificate({
<span class='line'>177</span>  *  tbsobj: &lt;&lt;OBJ>>,
<span class='line'>178</span>  *  sigalg: "SHA256withRSA",
<span class='line'>179</span>  *  cakey: "-----BEGIN PRIVATE KEY..."
<span class='line'>180</span>  * });
<span class='line'>181</span>  */</span><span class="WHIT">
<span class='line'>182</span> </span><span class="NAME">KJUR.asn1.x509.Certificate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>183</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.Certificate.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>184</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>185</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>186</span> </span><span class="WHIT">	</span><span class="NAME">_DERBitString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERBitString</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>187</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>188</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>189</span> </span><span class="WHIT">	</span><span class="NAME">_TBSCertificate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.TBSCertificate</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>190</span> </span><span class="WHIT">	</span><span class="NAME">_AlgorithmIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.AlgorithmIdentifier</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>191</span> 
<span class='line'>192</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>193</span> 
<span class='line'>194</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>195</span>      * set parameter&lt;br/>
<span class='line'>196</span>      * @name setByParam
<span class='line'>197</span>      * @memberOf KJUR.asn1.x509.Certificate#
<span class='line'>198</span>      * @function
<span class='line'>199</span>      * @param params {Array} JSON object of certificate parameters
<span class='line'>200</span>      * @since jsrsasign 9.0.0 asn1hex 2.0.0
<span class='line'>201</span>      * @description
<span class='line'>202</span>      * This method will set parameter 
<span class='line'>203</span>      * {@link KJUR.asn1.x509.Certificate#params}
<span class='line'>204</span>      * to this object.
<span class='line'>205</span>      * @example
<span class='line'>206</span>      * cert = new KJUR.asn1.x509.Certificate();
<span class='line'>207</span>      * cert.setByParam({
<span class='line'>208</span>      *   version: 3,
<span class='line'>209</span>      *   serial: {hex: "1234..."},
<span class='line'>210</span>      *   ...
<span class='line'>211</span>      * });
<span class='line'>212</span>      */</span><span class="WHIT">
<span class='line'>213</span> </span><span class="WHIT">    </span><span class="NAME">this.setByParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>214</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>215</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>216</span> 
<span class='line'>217</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>218</span>      * sign certificate&lt;br/>
<span class='line'>219</span>      * @name sign
<span class='line'>220</span>      * @memberOf KJUR.asn1.x509.Certificate#
<span class='line'>221</span>      * @function
<span class='line'>222</span>      * @description
<span class='line'>223</span>      * This method signs TBSCertificate with a specified 
<span class='line'>224</span>      * private key and algorithm by 
<span class='line'>225</span>      * this.params.cakey and this.params.sigalg parameter.
<span class='line'>226</span>      * @example
<span class='line'>227</span>      * cert = new KJUR.asn1.x509.Certificate({...});
<span class='line'>228</span>      * cert.sign()
<span class='line'>229</span>      */</span><span class="WHIT">
<span class='line'>230</span> </span><span class="WHIT">    </span><span class="NAME">this.sign</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>231</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>232</span> 
<span class='line'>233</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sigalg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.sigalg</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>234</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.sigalg.name</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> 
<span class='line'>235</span> 	    </span><span class="NAME">sigalg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.sigalg.name</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>236</span> 
<span class='line'>237</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hTBS</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.tbsobj.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>238</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sig</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.crypto.Signature</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">alg</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">sigalg</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>239</span> </span><span class="WHIT">	</span><span class="NAME">sig.init</span><span class="PUNC">(</span><span class="NAME">params.cakey</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>240</span> </span><span class="WHIT">	</span><span class="NAME">sig.updateHex</span><span class="PUNC">(</span><span class="NAME">hTBS</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>241</span> </span><span class="WHIT">	</span><span class="NAME">params.sighex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sig.sign</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>242</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>243</span> 
<span class='line'>244</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>245</span>      * get PEM formatted certificate string after signed
<span class='line'>246</span>      * @name getPEM
<span class='line'>247</span>      * @memberOf KJUR.asn1.x509.Certificate#
<span class='line'>248</span>      * @function
<span class='line'>249</span>      * @return PEM formatted string of certificate
<span class='line'>250</span>      * @since jsrsasign 9.0.0 asn1hex 2.0.0
<span class='line'>251</span>      * @description
<span class='line'>252</span>      * This method returns a string of PEM formatted 
<span class='line'>253</span>      * certificate.
<span class='line'>254</span>      * @example
<span class='line'>255</span>      * cert = new KJUR.asn1.x509.Certificate({...});
<span class='line'>256</span>      * cert.getPEM() &rarr;
<span class='line'>257</span>      * "-----BEGIN CERTIFICATE-----\r\n..."
<span class='line'>258</span>      */</span><span class="WHIT">
<span class='line'>259</span> </span><span class="WHIT">    </span><span class="NAME">this.getPEM</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>260</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">hextopem</span><span class="PUNC">(</span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"CERTIFICATE"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>261</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>262</span> 
<span class='line'>263</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>264</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>265</span> </span><span class="WHIT">	
<span class='line'>266</span> 	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.tbsobj</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">params.tbsobj</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>267</span> </span><span class="WHIT">	    </span><span class="NAME">params.tbsobj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_TBSCertificate</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>268</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>269</span> 
<span class='line'>270</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.sighex</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">params.cakey</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>271</span> </span><span class="WHIT">	    </span><span class="NAME">this.sign</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>272</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>273</span> 
<span class='line'>274</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.sighex</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>275</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"sighex or cakey parameter not defined"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>276</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>277</span> 
<span class='line'>278</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>279</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">params.tbsobj</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>280</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_AlgorithmIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">name</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.sigalg</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>281</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERBitString</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">hex</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"00"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">params.sighex</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>282</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>283</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">seq.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>284</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>285</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>286</span> 
<span class='line'>287</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>288</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>289</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.Certificate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>290</span> 
<span class='line'>291</span> </span><span class="COMM">/**
<span class='line'>292</span>  * ASN.1 TBSCertificate structure class&lt;br/>
<span class='line'>293</span>  * @name KJUR.asn1.x509.TBSCertificate
<span class='line'>294</span>  * @class ASN.1 TBSCertificate structure class
<span class='line'>295</span>  * @property {Array} params JSON object of parameters
<span class='line'>296</span>  * @param {Array} params JSON object of TBSCertificate parameters
<span class='line'>297</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>298</span>  * @see KJUR.asn1.x509.Certificate
<span class='line'>299</span>  *
<span class='line'>300</span>  * @description
<span class='line'>301</span>  * &lt;br/>
<span class='line'>302</span>  * NOTE: TBSCertificate class is updated without backward 
<span class='line'>303</span>  * compatibility from jsrsasign 9.0.0 asn1x509 2.0.0.
<span class='line'>304</span>  * Most of methods are removed and parameters can be set
<span class='line'>305</span>  * by JSON object.
<span class='line'>306</span>  *
<span class='line'>307</span>  * @example
<span class='line'>308</span>  * new TBSCertificate({
<span class='line'>309</span>  *  version: 3, // this can be omitted, the default is 3.
<span class='line'>310</span>  *  serial: {hex: "1234..."}, // DERInteger parameter
<span class='line'>311</span>  *  sigalg: "SHA256withRSA",
<span class='line'>312</span>  *  issuer: {array:[[{type:'O',value:'Test',ds:'prn'}]]}, // X500Name parameter
<span class='line'>313</span>  *  notbefore: "151231235959Z", // string, passed to Time
<span class='line'>314</span>  *  notafter: "251231235959Z", // string, passed to Time
<span class='line'>315</span>  *  subject: {array:[[{type:'O',value:'Test',ds:'prn'}]]}, // X500Name parameter
<span class='line'>316</span>  *  sbjpubkey: "-----BEGIN...", // KEYUTIL.getKey pubkey parameter
<span class='line'>317</span>  *  // As for extension parameters, please see extension class
<span class='line'>318</span>  *  // All extension parameters need to have "extname" parameter additionaly.
<span class='line'>319</span>  *  ext:[{ 
<span class='line'>320</span>  *   extname:"keyUsage",critical:true,
<span class='line'>321</span>  *   names:["digitalSignature","keyEncipherment"]
<span class='line'>322</span>  *  },{
<span class='line'>323</span>  *   extname:"cRLDistributionPoints",
<span class='line'>324</span>  *   array:[{dpname:{full:[{uri:"http://example.com/a1.crl"}]}}]
<span class='line'>325</span>  *  }, ...]
<span class='line'>326</span>  * })
<span class='line'>327</span>  *
<span class='line'>328</span>  * var tbsc = new TBSCertificate();
<span class='line'>329</span>  * tbsc.setByParam({version:3,serial:{hex:'1234...'},...});
<span class='line'>330</span>  */</span><span class="WHIT">
<span class='line'>331</span> </span><span class="NAME">KJUR.asn1.x509.TBSCertificate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>332</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.TBSCertificate.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>333</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>334</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>335</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>336</span> </span><span class="WHIT">	</span><span class="NAME">_DERTaggedObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERTaggedObject</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>337</span> </span><span class="WHIT">	</span><span class="NAME">_DERInteger</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERInteger</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>338</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>339</span> </span><span class="WHIT">	</span><span class="NAME">_AlgorithmIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.AlgorithmIdentifier</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>340</span> </span><span class="WHIT">	</span><span class="NAME">_Time</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.Time</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>341</span> </span><span class="WHIT">	</span><span class="NAME">_X500Name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.X500Name</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>342</span> </span><span class="WHIT">	</span><span class="NAME">_Extensions</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.Extensions</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>343</span> </span><span class="WHIT">	</span><span class="NAME">_SubjectPublicKeyInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.SubjectPublicKeyInfo</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>344</span> 
<span class='line'>345</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>346</span> 
<span class='line'>347</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>348</span>      * get array of ASN.1 object for extensions&lt;br/>
<span class='line'>349</span>      * @name setByParam
<span class='line'>350</span>      * @memberOf KJUR.asn1.x509.TBSCertificate#
<span class='line'>351</span>      * @function
<span class='line'>352</span>      * @param {Array} JSON object of TBSCertificate parameters
<span class='line'>353</span>      * @example
<span class='line'>354</span>      * tbsc = new KJUR.asn1.x509.TBSCertificate();
<span class='line'>355</span>      * tbsc.setByParam({version:3, serial:{hex:'1234...'},...});
<span class='line'>356</span>      */</span><span class="WHIT">
<span class='line'>357</span> </span><span class="WHIT">    </span><span class="NAME">this.setByParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>358</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>359</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>360</span> 
<span class='line'>361</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>362</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>363</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>364</span> 
<span class='line'>365</span> </span><span class="WHIT">	</span><span class="COMM">// X.509v3 default if params.version not defined</span><span class="WHIT">
<span class='line'>366</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.version</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">params.version</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>367</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">version</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT"> 
<span class='line'>368</span> 	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.version</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">version</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.version</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>369</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> 
<span class='line'>370</span> 		</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERTaggedObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">obj</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERInteger</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'int'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">version</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="WHIT"> 
<span class='line'>371</span> 	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>372</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>373</span> 
<span class='line'>374</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERInteger</span><span class="PUNC">(</span><span class="NAME">params.serial</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>375</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_AlgorithmIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">name</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.sigalg</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>376</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_X500Name</span><span class="PUNC">(</span><span class="NAME">params.issuer</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>377</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="PUNC">[</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Time</span><span class="PUNC">(</span><span class="NAME">params.notbefore</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>378</span> </span><span class="WHIT">					</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Time</span><span class="PUNC">(</span><span class="NAME">params.notafter</span><span class="PUNC">)</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>379</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_X500Name</span><span class="PUNC">(</span><span class="NAME">params.subject</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>380</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_SubjectPublicKeyInfo</span><span class="PUNC">(</span><span class="NAME">KEYUTIL.getKey</span><span class="PUNC">(</span><span class="NAME">params.sbjpubkey</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>381</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.ext</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">params.ext.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>382</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERTaggedObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">tag</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"a3"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>383</span> </span><span class="WHIT">					 </span><span class="NAME">obj</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Extensions</span><span class="PUNC">(</span><span class="NAME">params.ext</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>384</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>385</span> 
<span class='line'>386</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>387</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">seq.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>388</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>389</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>390</span> 
<span class='line'>391</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>392</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>393</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.TBSCertificate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>394</span> 
<span class='line'>395</span> </span><span class="COMM">/**
<span class='line'>396</span>  * Extensions ASN.1 structure class&lt;br/>
<span class='line'>397</span>  * @name KJUR.asn1.x509.Extensions
<span class='line'>398</span>  * @class Extensions ASN.1 structure class
<span class='line'>399</span>  * @param {Array} aParam array of JSON extension parameter
<span class='line'>400</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>401</span>  * @since jsrsasign 9.1.0 asn1x509 2.1.0
<span class='line'>402</span>  * @see KJUR.asn1.x509.TBSCertificate
<span class='line'>403</span>  * @see KJUR.asn1.x509.TBSCertList
<span class='line'>404</span>  * @see KJUR.asn1.csr.CertificationRequestInfo
<span class='line'>405</span>  * @see KJUR.asn1.x509.PrivateExtension
<span class='line'>406</span>  * @see KJUR.asn1.ocsp.ResponseData
<span class='line'>407</span>  * @see KJUR.asn1.ocsp.BasicOCSPResponse 
<span class='line'>408</span>  *
<span class='line'>409</span>  * @description
<span class='line'>410</span>  * This class represents
<span class='line'>411</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.1">
<span class='line'>412</span>  * Extensions defined in RFC 5280 4.1&lt;/a> and
<span class='line'>413</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.1.2.9">
<span class='line'>414</span>  * 4.1.2.9&lt;/a>.
<span class='line'>415</span>  * &lt;pre>
<span class='line'>416</span>  * Extensions  ::=  SEQUENCE SIZE (1..MAX) OF Extension
<span class='line'>417</span>  * &lt;/pre>
<span class='line'>418</span>  * &lt;p>NOTE: From jsrsasign 9.1.1, private extension or
<span class='line'>419</span>  * undefined extension have been supported by
<span class='line'>420</span>  * {@link KJUR.asn1.x509.PrivateExtension}.&lt;/p>
<span class='line'>421</span>  * 
<span class='line'>422</span>  * Here is a list of available extensions:
<span class='line'>423</span>  * &lt;ul>
<span class='line'>424</span>  * &lt;li>{@link KJUR.asn1.x509.BasicConstraints}&lt;/li>
<span class='line'>425</span>  * &lt;li>{@link KJUR.asn1.x509.KeyUsage}&lt;/li>
<span class='line'>426</span>  * &lt;li>{@link KJUR.asn1.x509.SubjectKeyIdentifier}&lt;/li>
<span class='line'>427</span>  * &lt;li>{@link KJUR.asn1.x509.AuthorityKeyIdentifier}&lt;/li>
<span class='line'>428</span>  * &lt;li>{@link KJUR.asn1.x509.SubjectAltName}&lt;/li>
<span class='line'>429</span>  * &lt;li>{@link KJUR.asn1.x509.IssuerAltName}&lt;/li>
<span class='line'>430</span>  * &lt;li>{@link KJUR.asn1.x509.CRLDistributionPoints}&lt;/li>
<span class='line'>431</span>  * &lt;li>{@link KJUR.asn1.x509.CertificatePolicies}&lt;/li>
<span class='line'>432</span>  * &lt;li>{@link KJUR.asn1.x509.CRLNumber}&lt;/li>
<span class='line'>433</span>  * &lt;li>{@link KJUR.asn1.x509.CRLReason}&lt;/li>
<span class='line'>434</span>  * &lt;li>{@link KJUR.asn1.x509.OCSPNonce}&lt;/li>
<span class='line'>435</span>  * &lt;li>{@link KJUR.asn1.x509.OCSPNoCheck}&lt;/li>
<span class='line'>436</span>  * &lt;li>{@link KJUR.asn1.x509.AdobeTimeStamp}&lt;/li>
<span class='line'>437</span>  * &lt;li>{@link KJUR.asn1.x509.SubjectDirectoryAttributes}&lt;/li>
<span class='line'>438</span>  * &lt;li>{@link KJUR.asn1.x509.PrivateExtension}&lt;/li>
<span class='line'>439</span>  * &lt;/ul>
<span class='line'>440</span>  * You can also use {@link KJUR.asn1.x509.PrivateExtension} object
<span class='line'>441</span>  * to specify a unsupported extension.
<span class='line'>442</span>  *
<span class='line'>443</span>  * @example
<span class='line'>444</span>  * o = new KJUR.asn1.x509.Extensions([
<span class='line'>445</span>  *   {extname:"keyUsage",critical:true,names:["digitalSignature"]},
<span class='line'>446</span>  *   {extname:"subjectAltName",array:[{dns:"example.com"}]},
<span class='line'>447</span>  *   {extname:"1.2.3.4",extn:{prnstr:"aa"}} // private extension
<span class='line'>448</span>  * ]);
<span class='line'>449</span>  * o.tohex() &rarr; "30..."
<span class='line'>450</span>  */</span><span class="WHIT">
<span class='line'>451</span> </span><span class="NAME">KJUR.asn1.x509.Extensions</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aParam</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>452</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.Extensions.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>453</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>454</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>455</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>456</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>457</span> </span><span class="WHIT">    </span><span class="NAME">this.aParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>458</span> 
<span class='line'>459</span> </span><span class="WHIT">    </span><span class="NAME">this.setByParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aParam</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">this.aParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aParam</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>460</span> 
<span class='line'>461</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>462</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>463</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">this.aParam.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>464</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">param</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.aParam</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>465</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">param.extname</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>466</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>467</span> 
<span class='line'>468</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">param.extn</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>469</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.PrivateExtension</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>470</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"subjectKeyIdentifier"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>471</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.SubjectKeyIdentifier</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>472</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"keyUsage"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>473</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.KeyUsage</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>474</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"subjectAltName"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>475</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.SubjectAltName</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>476</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"issuerAltName"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>477</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.IssuerAltName</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>478</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"basicConstraints"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>479</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.BasicConstraints</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>480</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"nameConstraints"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>481</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.NameConstraints</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>482</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"cRLDistributionPoints"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>483</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.CRLDistributionPoints</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>484</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"certificatePolicies"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>485</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.CertificatePolicies</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>486</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"policyMappings"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>487</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.PolicyMappings</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>488</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"policyConstraints"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>489</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.PolicyConstraints</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>490</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"inhibitAnyPolicy"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>491</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.InhibitAnyPolicy</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>492</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"authorityKeyIdentifier"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>493</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.AuthorityKeyIdentifier</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>494</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"extKeyUsage"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>495</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.ExtKeyUsage</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>496</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"authorityInfoAccess"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>497</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.AuthorityInfoAccess</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>498</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"cRLNumber"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>499</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.CRLNumber</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>500</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"cRLReason"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>501</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.CRLReason</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>502</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"ocspNonce"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>503</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.OCSPNonce</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>504</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"ocspNoCheck"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>505</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.OCSPNoCheck</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>506</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"adobeTimeStamp"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>507</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.AdobeTimeStamp</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>508</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"subjectDirectoryAttributes"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>509</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.SubjectDirectoryAttributes</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>510</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>511</span> </span><span class="WHIT">		</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"extension not supported:"</span><span class="WHIT">
<span class='line'>512</span> </span><span class="WHIT">				</span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">JSON.stringify</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>513</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>514</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>515</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>516</span> 
<span class='line'>517</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>518</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">seq.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>519</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>520</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>521</span> 
<span class='line'>522</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">aParam</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">aParam</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>523</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>524</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.Extensions</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>525</span> 
<span class='line'>526</span> 
<span class='line'>527</span> </span><span class="COMM">// === END   TBSCertificate ===================================================</span><span class="WHIT">
<span class='line'>528</span> 
<span class='line'>529</span> </span><span class="COMM">// === BEGIN X.509v3 Extensions Related =======================================</span><span class="WHIT">
<span class='line'>530</span> 
<span class='line'>531</span> </span><span class="COMM">/**
<span class='line'>532</span>  * base Extension ASN.1 structure class
<span class='line'>533</span>  * @name KJUR.asn1.x509.Extension
<span class='line'>534</span>  * @class base Extension ASN.1 structure class
<span class='line'>535</span>  * @param {Array} params associative array of parameters (ex. {'critical': true})
<span class='line'>536</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>537</span>  * @description
<span class='line'>538</span>  * &lt;pre>
<span class='line'>539</span>  * Extension  ::=  SEQUENCE  {
<span class='line'>540</span>  *     extnID      OBJECT IDENTIFIER,
<span class='line'>541</span>  *     critical    BOOLEAN DEFAULT FALSE,
<span class='line'>542</span>  *     extnValue   OCTET STRING  }
<span class='line'>543</span>  * &lt;/pre>
<span class='line'>544</span>  * @example
<span class='line'>545</span>  */</span><span class="WHIT">
<span class='line'>546</span> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>547</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.Extension.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>548</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>549</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>550</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>551</span> </span><span class="WHIT">	</span><span class="NAME">_DERObjectIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERObjectIdentifier</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>552</span> </span><span class="WHIT">	</span><span class="NAME">_DEROctetString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DEROctetString</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>553</span> </span><span class="WHIT">	</span><span class="NAME">_DERBitString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERBitString</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>554</span> </span><span class="WHIT">	</span><span class="NAME">_DERBoolean</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERBoolean</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>555</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>556</span> 
<span class='line'>557</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>558</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1Oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERObjectIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'oid'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.oid</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>559</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1EncapExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'>560</span> </span><span class="WHIT">            </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DEROctetString</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'hex'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.getExtnValueHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>561</span> 
<span class='line'>562</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1Array</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Array</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>563</span> </span><span class="WHIT">        </span><span class="NAME">asn1Array.push</span><span class="PUNC">(</span><span class="NAME">asn1Oid</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>564</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">asn1Array.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERBoolean</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>565</span> </span><span class="WHIT">        </span><span class="NAME">asn1Array.push</span><span class="PUNC">(</span><span class="NAME">asn1EncapExtnValue</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>566</span> 
<span class='line'>567</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1Seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'array'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">asn1Array</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>568</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">asn1Seq.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>569</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>570</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>571</span> 
<span class='line'>572</span> </span><span class="WHIT">    </span><span class="NAME">this.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>573</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>574</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.critical</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>575</span> </span><span class="WHIT">            </span><span class="NAME">this.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.critical</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>576</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>577</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>578</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>579</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>580</span> 
<span class='line'>581</span> </span><span class="COMM">/**
<span class='line'>582</span>  * KeyUsage ASN.1 structure class
<span class='line'>583</span>  * @name KJUR.asn1.x509.KeyUsage
<span class='line'>584</span>  * @class KeyUsage ASN.1 structure class
<span class='line'>585</span>  * @param {Array} params associative array of parameters (ex. {'bin': '11', 'critical': true})
<span class='line'>586</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>587</span>  * @description
<span class='line'>588</span>  * This class is for &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.3" target="_blank">KeyUsage&lt;/a> X.509v3 extension.
<span class='line'>589</span>  * &lt;pre>
<span class='line'>590</span>  * id-ce-keyUsage OBJECT IDENTIFIER ::=  { id-ce 15 }
<span class='line'>591</span>  * KeyUsage ::= BIT STRING {
<span class='line'>592</span>  *   digitalSignature   (0),
<span class='line'>593</span>  *   nonRepudiation     (1),
<span class='line'>594</span>  *   keyEncipherment    (2),
<span class='line'>595</span>  *   dataEncipherment   (3),
<span class='line'>596</span>  *   keyAgreement       (4),
<span class='line'>597</span>  *   keyCertSign        (5),
<span class='line'>598</span>  *   cRLSign            (6),
<span class='line'>599</span>  *   encipherOnly       (7),
<span class='line'>600</span>  *   decipherOnly       (8) }
<span class='line'>601</span>  * &lt;/pre>&lt;br/>
<span class='line'>602</span>  * NOTE: 'names' parameter is supprted since jsrsasign 8.0.14.
<span class='line'>603</span>  * @example
<span class='line'>604</span>  * o = new KJUR.asn1.x509.KeyUsage({bin: "11"});
<span class='line'>605</span>  * o = new KJUR.asn1.x509.KeyUsage({critical: true, bin: "11"});
<span class='line'>606</span>  * o = new KJUR.asn1.x509.KeyUsage({names: ['digitalSignature', 'keyAgreement']});
<span class='line'>607</span>  */</span><span class="WHIT">
<span class='line'>608</span> </span><span class="NAME">KJUR.asn1.x509.KeyUsage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>609</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.KeyUsage.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>610</span> 
<span class='line'>611</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>612</span> 
<span class='line'>613</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_nameValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>614</span> </span><span class="WHIT">	</span><span class="NAME">digitalSignature</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>615</span> </span><span class="WHIT">	</span><span class="NAME">nonRepudiation</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>616</span> </span><span class="WHIT">	</span><span class="NAME">keyEncipherment</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="NUMB">2</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>617</span> </span><span class="WHIT">	</span><span class="NAME">dataEncipherment</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="NUMB">3</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>618</span> </span><span class="WHIT">	</span><span class="NAME">keyAgreement</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="NUMB">4</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>619</span> </span><span class="WHIT">	</span><span class="NAME">keyCertSign</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="NUMB">5</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>620</span> </span><span class="WHIT">	</span><span class="NAME">cRLSign</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="NUMB">6</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>621</span> </span><span class="WHIT">	</span><span class="NAME">encipherOnly</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="NUMB">7</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>622</span> </span><span class="WHIT">	</span><span class="NAME">decipherOnly</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="NUMB">8</span><span class="WHIT">
<span class='line'>623</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>624</span> 
<span class='line'>625</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>626</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">binString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getBinValue</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>627</span> </span><span class="WHIT">        </span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DERBitString</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">bin</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">binString</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>628</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>629</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>630</span> 
<span class='line'>631</span> </span><span class="WHIT">    </span><span class="NAME">this.getBinValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>632</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>633</span> 
<span class='line'>634</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"object"</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>635</span> </span><span class="WHIT">	    </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params.names</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"object"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params.bin</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>636</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="PUNC">(</span><span class="STRN">"parameter not yet set"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>637</span> 
<span class='line'>638</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.names</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>639</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">namearraytobinstr</span><span class="PUNC">(</span><span class="NAME">params.names</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">_nameValue</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>640</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.bin</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>641</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">params.bin</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>642</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>643</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="PUNC">(</span><span class="STRN">"parameter not set properly"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>644</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>645</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>646</span> 
<span class='line'>647</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"2.5.29.15"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>648</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>649</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>650</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.KeyUsage</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>651</span> 
<span class='line'>652</span> </span><span class="COMM">/**
<span class='line'>653</span>  * BasicConstraints ASN.1 structure class
<span class='line'>654</span>  * @name KJUR.asn1.x509.BasicConstraints
<span class='line'>655</span>  * @class BasicConstraints ASN.1 structure class
<span class='line'>656</span>  * @param {Array} params JSON object for parameters (ex. {cA:true,critical:true})
<span class='line'>657</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>658</span>  * @see {@link X509#getExtBasicConstraints}
<span class='line'>659</span>  * @description
<span class='line'>660</span>  * This class represents 
<span class='line'>661</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.9">
<span class='line'>662</span>  * BasicConstraints extension defined in RFC 5280 4.2.1.9&lt;/a>.
<span class='line'>663</span>  * &lt;pre>
<span class='line'>664</span>  *  id-ce-basicConstraints OBJECT IDENTIFIER ::=  { id-ce 19 }
<span class='line'>665</span>  *  BasicConstraints ::= SEQUENCE {
<span class='line'>666</span>  *       cA                      BOOLEAN DEFAULT FALSE,
<span class='line'>667</span>  *       pathLenConstraint       INTEGER (0..MAX) OPTIONAL }
<span class='line'>668</span>  * &lt;/pre>
<span class='line'>669</span>  * Its constructor can have following parameters:
<span class='line'>670</span>  * &lt;ul>
<span class='line'>671</span>  * &lt;li>{Boolean}cA - cA flag&lt;/li>
<span class='line'>672</span>  * &lt;li>{Integer}pathLen - pathLen field value&lt;/li>
<span class='line'>673</span>  * &lt;li>{Boolean}critical - critical flag&lt;/li>
<span class='line'>674</span>  * &lt;/ul>
<span class='line'>675</span>  * @example
<span class='line'>676</span>  * new KJUR.asn1.x509.BasicConstraints({
<span class='line'>677</span>  *   cA: true,
<span class='line'>678</span>  *   pathLen: 3,
<span class='line'>679</span>  *   critical: true
<span class='line'>680</span>  * })
<span class='line'>681</span>  */</span><span class="WHIT">
<span class='line'>682</span> </span><span class="NAME">KJUR.asn1.x509.BasicConstraints</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>683</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.BasicConstraints.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>684</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>685</span> </span><span class="WHIT">	</span><span class="NAME">_DERBoolean</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERBoolean</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>686</span> </span><span class="WHIT">	</span><span class="NAME">_DERInteger</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERInteger</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>687</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>688</span> 
<span class='line'>689</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">cA</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>690</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pathLen</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>691</span> 
<span class='line'>692</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>693</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1Array</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Array</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>694</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.cA</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">asn1Array.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERBoolean</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>695</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.pathLen</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>696</span> </span><span class="WHIT">            </span><span class="NAME">asn1Array.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERInteger</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'int'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.pathLen</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>697</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1Seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'array'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">asn1Array</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>698</span> </span><span class="WHIT">        </span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">asn1Seq</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>699</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>700</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>701</span> 
<span class='line'>702</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"2.5.29.19"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>703</span> </span><span class="WHIT">    </span><span class="NAME">this.cA</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>704</span> </span><span class="WHIT">    </span><span class="NAME">this.pathLen</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>705</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>706</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.cA</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>707</span> </span><span class="WHIT">            </span><span class="NAME">this.cA</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.cA</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>708</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>709</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.pathLen</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>710</span> </span><span class="WHIT">            </span><span class="NAME">this.pathLen</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.pathLen</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>711</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>712</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>713</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>714</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.BasicConstraints</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>715</span> 
<span class='line'>716</span> </span><span class="COMM">/**
<span class='line'>717</span>  * CRLDistributionPoints ASN.1 structure class
<span class='line'>718</span>  * @name KJUR.asn1.x509.CRLDistributionPoints
<span class='line'>719</span>  * @class CRLDistributionPoints ASN.1 structure class
<span class='line'>720</span>  * @param {Array} params associative array of parameters (ex. {'uri': 'http://a.com/', 'critical': true})
<span class='line'>721</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>722</span>  * @see {@link X509#getExtCRLDistributionPoints}
<span class='line'>723</span>  * @see {@link KJUR.asn1.x509.DistributionPoint}
<span class='line'>724</span>  * @see {@link KJUR.asn1.x509.GeneralNames}
<span class='line'>725</span>  * @description
<span class='line'>726</span>  * This class represents 
<span class='line'>727</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.13">
<span class='line'>728</span>  * CRLDistributionPoints extension defined in RFC 5280 4.2.1.13&lt;/a>.
<span class='line'>729</span>  * &lt;pre>
<span class='line'>730</span>  * id-ce-cRLDistributionPoints OBJECT IDENTIFIER ::=  { id-ce 31 }
<span class='line'>731</span>  * CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint
<span class='line'>732</span>  * DistributionPoint ::= SEQUENCE {
<span class='line'>733</span>  *      distributionPoint       [0]     DistributionPointName OPTIONAL,
<span class='line'>734</span>  *      reasons                 [1]     ReasonFlags OPTIONAL,
<span class='line'>735</span>  *      cRLIssuer               [2]     GeneralNames OPTIONAL }
<span class='line'>736</span>  * DistributionPointName ::= CHOICE {
<span class='line'>737</span>  *      fullName                [0]     GeneralNames,
<span class='line'>738</span>  *      nameRelativeToCRLIssuer [1]     RelativeDistinguishedName }
<span class='line'>739</span>  * &lt;/pre>
<span class='line'>740</span>  * Constructor can have following parameter:
<span class='line'>741</span>  * &lt;ul>
<span class='line'>742</span>  * &lt;li>{Array}array - array of {@link KJUR.asn1.x509.DistributionPoint} parameter&lt;/li>
<span class='line'>743</span>  * &lt;li>{Boolean}critical - critical flag&lt;/li>
<span class='line'>744</span>  * &lt;/ul>
<span class='line'>745</span>  * @example
<span class='line'>746</span>  * new KJUR.asn1.x509.CRLDistributionPoints({
<span class='line'>747</span>  *   array: [{fulluri: "http://aaa.com/"}, {fulluri: "ldap://aaa.com/"}],
<span class='line'>748</span>  *   critical: true
<span class='line'>749</span>  * })
<span class='line'>750</span>  */</span><span class="WHIT">
<span class='line'>751</span> </span><span class="NAME">KJUR.asn1.x509.CRLDistributionPoints</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>752</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.CRLDistributionPoints.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>753</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>754</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>755</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>756</span> 
<span class='line'>757</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>758</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>759</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>760</span> 
<span class='line'>761</span> </span><span class="WHIT">    </span><span class="NAME">this.setByDPArray</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">dpArray</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>762</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1Array</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>763</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">dpArray.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>764</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">dpArray</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>765</span> </span><span class="WHIT">		</span><span class="NAME">asn1Array.push</span><span class="PUNC">(</span><span class="NAME">dpArray</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>766</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>767</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.DistributionPoint</span><span class="PUNC">(</span><span class="NAME">dpArray</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>768</span> </span><span class="WHIT">		</span><span class="NAME">asn1Array.push</span><span class="PUNC">(</span><span class="NAME">dp</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>769</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>770</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>771</span> </span><span class="WHIT">        </span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'array'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">asn1Array</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>772</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>773</span> 
<span class='line'>774</span> </span><span class="WHIT">    </span><span class="NAME">this.setByOneURI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">uri</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>775</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dp1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.DistributionPoint</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">fulluri</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">uri</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>776</span> </span><span class="WHIT">        </span><span class="NAME">this.setByDPArray</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="NAME">dp1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>777</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>778</span> 
<span class='line'>779</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"2.5.29.31"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>780</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>781</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.array</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>782</span> </span><span class="WHIT">            </span><span class="NAME">this.setByDPArray</span><span class="PUNC">(</span><span class="NAME">params.array</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>783</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.uri</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>784</span> </span><span class="WHIT">            </span><span class="NAME">this.setByOneURI</span><span class="PUNC">(</span><span class="NAME">params.uri</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>785</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>786</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>787</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>788</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.CRLDistributionPoints</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>789</span> 
<span class='line'>790</span> </span><span class="COMM">/**
<span class='line'>791</span>  * DistributionPoint ASN.1 structure class&lt;br/>
<span class='line'>792</span>  * @name KJUR.asn1.x509.DistributionPoint
<span class='line'>793</span>  * @class DistributionPoint ASN.1 structure class
<span class='line'>794</span>  * @param {Array} params JSON object of parameters (OPTIONAL)
<span class='line'>795</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>796</span>  * @see {@link KJUR.asn1.x509.CRLDistributionPoints}
<span class='line'>797</span>  * @see {@link KJUR.asn1.x509.DistributionPointName}
<span class='line'>798</span>  * @see {@link KJUR.asn1.x509.GeneralNames}
<span class='line'>799</span>  * @see {@link X509#getDistributionPoint}
<span class='line'>800</span>  * @description
<span class='line'>801</span>  * This class represents 
<span class='line'>802</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.13">
<span class='line'>803</span>  * DistributionPoint defined in RFC 5280 4.2.1.13&lt;/a>.
<span class='line'>804</span>  * &lt;pre>
<span class='line'>805</span>  * DistributionPoint ::= SEQUENCE {
<span class='line'>806</span>  *      distributionPoint       [0]     DistributionPointName OPTIONAL,
<span class='line'>807</span>  *      reasons                 [1]     ReasonFlags OPTIONAL,
<span class='line'>808</span>  *      cRLIssuer               [2]     GeneralNames OPTIONAL }
<span class='line'>809</span>  * &lt;/pre>
<span class='line'>810</span>  * Constructor can have following parameter:
<span class='line'>811</span>  * &lt;ul>
<span class='line'>812</span>  * &lt;li>{String}fulluri - uri string for fullName uri. This has the same meaning for '{dpname: {full: [{uri: "..."]}}'.&lt;/li>
<span class='line'>813</span>  * &lt;li>{Array}dpname - JSON object for {@link KJUR.asn1.x509.DistributionPointName} parameters&lt;/li>
<span class='line'>814</span>  * &lt;li>{DistrubutionPoint}dpobj - {@link KJUR.asn1.x509.DistributionPointName} object (DEPRECATED)&lt;/li>
<span class='line'>815</span>  * &lt;/ul>
<span class='line'>816</span>  * &lt;br/>
<span class='line'>817</span>  * NOTE1: Parameter "fulluri" and "dpname" supported 
<span class='line'>818</span>  * since jsrsasign 9.0.0 asn1x509 2.0.0.
<span class='line'>819</span>  * &lt;br/>
<span class='line'>820</span>  * NOTE2: The "reasons" and "cRLIssuer" fields are currently
<span class='line'>821</span>  * not supported.
<span class='line'>822</span>  * @example
<span class='line'>823</span>  * new KJUR.asn1.x509.DistributionPoint(
<span class='line'>824</span>  *   {fulluri: "http://example.com/crl1.crl"})
<span class='line'>825</span>  * new KJUR.asn1.x509.DistributionPoint(
<span class='line'>826</span>  *   {dpname: {full: [{uri: "http://example.com/crl1.crl"}]}})
<span class='line'>827</span>  * new KJUR.asn1.x509.DistributionPoint(
<span class='line'>828</span>  *   {dpobj: new DistributionPoint(...)})
<span class='line'>829</span>  */</span><span class="WHIT">
<span class='line'>830</span> </span><span class="NAME">KJUR.asn1.x509.DistributionPoint</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>831</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.DistributionPoint.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>832</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1DP</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>833</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>834</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>835</span> </span><span class="WHIT">	</span><span class="NAME">_DistributionPointName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509.DistributionPointName</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>836</span> 
<span class='line'>837</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>838</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>839</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.asn1DP</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>840</span> </span><span class="WHIT">            </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">o1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERTaggedObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'explicit'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>841</span> </span><span class="WHIT">                                                     </span><span class="STRN">'tag'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'a0'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>842</span> </span><span class="WHIT">                                                     </span><span class="STRN">'obj'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.asn1DP</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>843</span> </span><span class="WHIT">            </span><span class="NAME">seq.appendASN1Object</span><span class="PUNC">(</span><span class="NAME">o1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>844</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>845</span> </span><span class="WHIT">        </span><span class="NAME">this.hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">seq.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>846</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.hTLV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>847</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>848</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>849</span> 
<span class='line'>850</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>851</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.dpobj</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>852</span> </span><span class="WHIT">            </span><span class="NAME">this.asn1DP</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.dpobj</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>853</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.dpname</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>854</span> </span><span class="WHIT">            </span><span class="NAME">this.asn1DP</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DistributionPointName</span><span class="PUNC">(</span><span class="NAME">params.dpname</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>855</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.fulluri</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>856</span> </span><span class="WHIT">            </span><span class="NAME">this.asn1DP</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DistributionPointName</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">full</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">{</span><span class="NAME">uri</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.fulluri</span><span class="PUNC">}</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>857</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>858</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>859</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>860</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.DistributionPoint</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>861</span> 
<span class='line'>862</span> </span><span class="COMM">/**
<span class='line'>863</span>  * DistributionPointName ASN.1 structure class&lt;br/>
<span class='line'>864</span>  * @name KJUR.asn1.x509.DistributionPointName
<span class='line'>865</span>  * @class DistributionPointName ASN.1 structure class
<span class='line'>866</span>  * @param {Array} params JSON object of parameters or GeneralNames object
<span class='line'>867</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>868</span>  * @see {@link KJUR.asn1.x509.CRLDistributionPoints}
<span class='line'>869</span>  * @see {@link KJUR.asn1.x509.DistributionPoint}
<span class='line'>870</span>  * @see {@link KJUR.asn1.x509.GeneralNames}
<span class='line'>871</span>  * @see {@link X509#getDistributionPointName}
<span class='line'>872</span>  * @description
<span class='line'>873</span>  * This class represents 
<span class='line'>874</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.13">
<span class='line'>875</span>  * DistributionPointName defined in RFC 5280 4.2.1.13&lt;/a>.
<span class='line'>876</span>  * &lt;pre>
<span class='line'>877</span>  * DistributionPointName ::= CHOICE {
<span class='line'>878</span>  *      fullName                [0]     GeneralNames,
<span class='line'>879</span>  *      nameRelativeToCRLIssuer [1]     RelativeDistinguishedName }
<span class='line'>880</span>  * &lt;/pre>
<span class='line'>881</span>  * Constructor can have following parameter:
<span class='line'>882</span>  * &lt;ul>
<span class='line'>883</span>  * &lt;li>{String}full - JSON object parameter of {@link KJUR.asn1.x509.GeneralNames} for 'fullName' field&lt;/li>
<span class='line'>884</span>  * &lt;li>{GeneralNames} - {@link KJUR.asn1.x509.GeneralNames} object for 'fullName'&lt;/li>
<span class='line'>885</span>  * &lt;/ul>
<span class='line'>886</span>  * NOTE1: 'full' parameter have been suppored since jsrsasign 9.0.0 asn1x509 2.0.0.
<span class='line'>887</span>  * &lt;br>
<span class='line'>888</span>  * NOTE2: The 'nameRelativeToCRLIssuer' field is currently not supported.
<span class='line'>889</span>  * @example
<span class='line'>890</span>  * new KJUR.asn1.x509.DistributionPointName({full: &lt;&lt;GeneralNamesParameter>>})
<span class='line'>891</span>  * new KJUR.asn1.x509.DistributionPointName({full: [{uri: &lt;&lt;CDPURI>>}]})
<span class='line'>892</span>  * new KJUR.asn1.x509.DistributionPointName({full: [{dn: &lt;&lt;DN Parameter>>}]}
<span class='line'>893</span>  * new KJUR.asn1.x509.DistributionPointName({full: [{uri: "http://example.com/root.crl"}]})
<span class='line'>894</span>  * new KJUR.asn1.x509.DistributionPointName({full: [{dn {str: "/C=US/O=Test"}}]})
<span class='line'>895</span>  * new KJUR.asn1.x509.DistributionPointName(new GeneralNames(...))
<span class='line'>896</span>  */</span><span class="WHIT">
<span class='line'>897</span> </span><span class="NAME">KJUR.asn1.x509.DistributionPointName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>898</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.DistributionPointName.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>899</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1Obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>900</span> </span><span class="WHIT">	</span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>901</span> </span><span class="WHIT">	</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>902</span> </span><span class="WHIT">	</span><span class="NAME">asn1V</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>903</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>904</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>905</span> </span><span class="WHIT">	</span><span class="NAME">_DERTaggedObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERTaggedObject</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>906</span> 
<span class='line'>907</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>908</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.type</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"full"</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>909</span> </span><span class="WHIT">            </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"currently type shall be 'full': "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.type</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>910</span> </span><span class="WHIT">        </span><span class="NAME">this.asn1Obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERTaggedObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'explicit'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>911</span> </span><span class="WHIT">                                             </span><span class="STRN">'tag'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.tag</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>912</span> </span><span class="WHIT">                                             </span><span class="STRN">'obj'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.asn1V</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>913</span> </span><span class="WHIT">        </span><span class="NAME">this.hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.asn1Obj.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>914</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.hTLV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>915</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>916</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>917</span> 
<span class='line'>918</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>919</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">_KJUR_asn1.x509.GeneralNames.prototype.isPrototypeOf</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>920</span> </span><span class="WHIT">            </span><span class="NAME">this.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"full"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>921</span> </span><span class="WHIT">            </span><span class="NAME">this.tag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"a0"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>922</span> </span><span class="WHIT">            </span><span class="NAME">this.asn1V</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>923</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.full</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>924</span> </span><span class="WHIT">            </span><span class="NAME">this.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"full"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>925</span> </span><span class="WHIT">            </span><span class="NAME">this.tag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"a0"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>926</span> </span><span class="WHIT">            </span><span class="NAME">this.asn1V</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509.GeneralNames</span><span class="PUNC">(</span><span class="NAME">params.full</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>927</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>928</span> </span><span class="WHIT">            </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"This class supports GeneralNames only as argument"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>929</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>930</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>931</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>932</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.DistributionPointName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>933</span> 
<span class='line'>934</span> </span><span class="COMM">/**
<span class='line'>935</span>  * CertificatePolicies ASN.1 structure class
<span class='line'>936</span>  * @name KJUR.asn1.x509.CertificatePolicies
<span class='line'>937</span>  * @class CertificatePolicies ASN.1 structure class
<span class='line'>938</span>  * @param {Array} params associative array of parameters
<span class='line'>939</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>940</span>  * @since jsrsasign 8.0.23 asn1x509 1.1.12
<span class='line'>941</span>  * @see KJUR.asn1.x509.CertificatePolicies
<span class='line'>942</span>  * @see KJUR.asn1.x509.PolicyInformation
<span class='line'>943</span>  * @see KJUR.asn1.x509.PolicyQualifierInfo
<span class='line'>944</span>  * @see KJUR.asn1.x509.UserNotice
<span class='line'>945</span>  * @see KJUR.asn1.x509.NoticeReference
<span class='line'>946</span>  * @see KJUR.asn1.x509.DisplayText
<span class='line'>947</span>  * @description
<span class='line'>948</span>  * This class represents 
<span class='line'>949</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.4">
<span class='line'>950</span>  * CertificatePolicies extension defined in RFC 5280 4.2.1.4&lt;/a>.
<span class='line'>951</span>  * &lt;pre>
<span class='line'>952</span>  * id-ce-certificatePolicies OBJECT IDENTIFIER ::=  { id-ce 32 }
<span class='line'>953</span>  * CertificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformation
<span class='line'>954</span>  * &lt;/pre>
<span class='line'>955</span>  * Its constructor can have following parameters:
<span class='line'>956</span>  * &lt;ul>
<span class='line'>957</span>  * &lt;li>array - array of {@link KJUR.asn1.x509.PolicyInformation} parameter&lt;/li>
<span class='line'>958</span>  * &lt;li>critical - boolean: critical flag&lt;/li>
<span class='line'>959</span>  * &lt;/ul>
<span class='line'>960</span>  * NOTE: Returned JSON value format have been changed without 
<span class='line'>961</span>  * backward compatibility since jsrsasign 9.0.0 asn1x509 2.0.0.
<span class='line'>962</span>  * @example
<span class='line'>963</span>  * e1 = new KJUR.asn1.x509.CertificatePolicies({
<span class='line'>964</span>  *   array: [
<span class='line'>965</span>  *     { policyoid: "1.2.3.4.5",
<span class='line'>966</span>  *       array: [
<span class='line'>967</span>  *         { cps: "https://example.com/repository" },
<span class='line'>968</span>  *         { unotice: {
<span class='line'>969</span>  *           noticeref: { // CA SHOULD NOT use this by RFC
<span class='line'>970</span>  *             org: {type: "ia5", str: "Sample Org"},
<span class='line'>971</span>  *             noticenum: [{int: 5}, {hex: "01af"}]
<span class='line'>972</span>  *           },
<span class='line'>973</span>  *           exptext: {type: "ia5", str: "Sample Policy"}
<span class='line'>974</span>  *         }}
<span class='line'>975</span>  *       ]
<span class='line'>976</span>  *     }
<span class='line'>977</span>  *   ],
<span class='line'>978</span>  *   critical: true
<span class='line'>979</span>  * });
<span class='line'>980</span>  */</span><span class="WHIT">
<span class='line'>981</span> </span><span class="NAME">KJUR.asn1.x509.CertificatePolicies</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>982</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.CertificatePolicies.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>983</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>984</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>985</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>986</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>987</span> </span><span class="WHIT">	</span><span class="NAME">_PolicyInformation</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.PolicyInformation</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>988</span> 
<span class='line'>989</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>990</span> 
<span class='line'>991</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>992</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aPI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>993</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">this.params.array.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>994</span> </span><span class="WHIT">	    </span><span class="NAME">aPI.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_PolicyInformation</span><span class="PUNC">(</span><span class="NAME">this.params.array</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>995</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>996</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">aPI</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>997</span> </span><span class="WHIT">	</span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>998</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>999</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1000</span> 
<span class='line'>1001</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"2.5.29.32"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1002</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1003</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1004</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1005</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1006</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.CertificatePolicies</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1007</span> 
<span class='line'>1008</span> </span><span class="COMM">// ===== BEGIN CertificatePolicies related classes =====</span><span class="WHIT">
<span class='line'>1009</span> </span><span class="COMM">/**
<span class='line'>1010</span>  * PolicyInformation ASN.1 structure class
<span class='line'>1011</span>  * @name KJUR.asn1.x509.PolicyInformation
<span class='line'>1012</span>  * @class PolicyInformation ASN.1 structure class
<span class='line'>1013</span>  * @param {Array} params JSON object of parameters
<span class='line'>1014</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>1015</span>  * @since jsrsasign 8.0.23 asn1x509 1.1.12
<span class='line'>1016</span>  * @see KJUR.asn1.x509.CertificatePolicies
<span class='line'>1017</span>  * @see KJUR.asn1.x509.PolicyInformation
<span class='line'>1018</span>  * @see KJUR.asn1.x509.PolicyQualifierInfo
<span class='line'>1019</span>  * @see KJUR.asn1.x509.UserNotice
<span class='line'>1020</span>  * @see KJUR.asn1.x509.NoticeReference
<span class='line'>1021</span>  * @see KJUR.asn1.x509.DisplayText
<span class='line'>1022</span>  * @description
<span class='line'>1023</span>  * This class represents 
<span class='line'>1024</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.4">
<span class='line'>1025</span>  * PolicyInformation defined in RFC 5280 4.2.1.4&lt;/a>.
<span class='line'>1026</span>  * &lt;pre>
<span class='line'>1027</span>  * PolicyInformation ::= SEQUENCE {
<span class='line'>1028</span>  *      policyIdentifier   CertPolicyId,
<span class='line'>1029</span>  *      policyQualifiers   SEQUENCE SIZE (1..MAX) OF
<span class='line'>1030</span>  *                         PolicyQualifierInfo OPTIONAL }
<span class='line'>1031</span>  * CertPolicyId ::= OBJECT IDENTIFIER
<span class='line'>1032</span>  * Its constructor can have following parameters:
<span class='line'>1033</span>  * &lt;ul>
<span class='line'>1034</span>  * &lt;li>{String}policyoid - policy OID (ex. "1.2.3.4.5")&lt;/li>
<span class='line'>1035</span>  * &lt;li>{Object}array - array of {@link KJUR.asn1.x509.PolicyQualifierInfo}
<span class='line'>1036</span>  * parameters (OPTIONAL)&lt;/li>
<span class='line'>1037</span>  * &lt;/ul>
<span class='line'>1038</span>  * @example
<span class='line'>1039</span>  * new KJUR.asn1.x509.PolicyInformation({
<span class='line'>1040</span>  *   policyoid: "1.2.3.4.5",
<span class='line'>1041</span>  *   array: [
<span class='line'>1042</span>  *     { cps: "https://example.com/repository" },
<span class='line'>1043</span>  *     { unotice: {
<span class='line'>1044</span>  *       noticeref: { // CA SHOULD NOT use this by RFC
<span class='line'>1045</span>  *         org: {type: "ia5", str: "Sample Org"},
<span class='line'>1046</span>  *         noticenum: [{int: 5}, {hex: "01af"}]
<span class='line'>1047</span>  *       },
<span class='line'>1048</span>  *       exptext: {type: "ia5", str: "Sample Policy"}
<span class='line'>1049</span>  *     }}
<span class='line'>1050</span>  *   ]
<span class='line'>1051</span>  * })
<span class='line'>1052</span>  */</span><span class="WHIT">
<span class='line'>1053</span> </span><span class="NAME">KJUR.asn1.x509.PolicyInformation</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1054</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.PolicyInformation.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1055</span> </span><span class="WHIT">								 </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1056</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1057</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1058</span> </span><span class="WHIT">	</span><span class="NAME">_DERObjectIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERObjectIdentifier</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1059</span> </span><span class="WHIT">	</span><span class="NAME">_PolicyQualifierInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509.PolicyQualifierInfo</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1060</span> 
<span class='line'>1061</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1062</span> 
<span class='line'>1063</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1064</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.params.policyoid</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>1065</span> </span><span class="WHIT">	    </span><span class="NAME">this.params.array</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1066</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"parameter oid and array missing"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1067</span> 
<span class='line'>1068</span> </span><span class="WHIT">	</span><span class="COMM">// policy oid</span><span class="WHIT">
<span class='line'>1069</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERObjectIdentifier</span><span class="PUNC">(</span><span class="NAME">this.params.policyoid</span><span class="PUNC">)</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1070</span> 
<span class='line'>1071</span> </span><span class="WHIT">	</span><span class="COMM">// array of ASN1Object of PolicyQualifierInfo</span><span class="WHIT">
<span class='line'>1072</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.params.array</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1073</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aPQI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1074</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">this.params.array.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1075</span> </span><span class="WHIT">		</span><span class="NAME">aPQI.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_PolicyQualifierInfo</span><span class="PUNC">(</span><span class="NAME">this.params.array</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1076</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1077</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">aPQI.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1078</span> </span><span class="WHIT">		</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">aPQI</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1079</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1080</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1081</span> 
<span class='line'>1082</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1083</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">seq.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1084</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1085</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1086</span> 
<span class='line'>1087</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1088</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1089</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1090</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1091</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.PolicyInformation</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1092</span> 
<span class='line'>1093</span> </span><span class="COMM">/**
<span class='line'>1094</span>  * PolicyQualifierInfo ASN.1 structure class
<span class='line'>1095</span>  * @name KJUR.asn1.x509.PolicyQualifierInfo
<span class='line'>1096</span>  * @class PolicyQualifierInfo ASN.1 structure class
<span class='line'>1097</span>  * @param {Array} params associative array of parameters
<span class='line'>1098</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>1099</span>  * @since jsrsasign 8.0.23 asn1x509 1.1.12
<span class='line'>1100</span>  * @description
<span class='line'>1101</span>  * This class represents 
<span class='line'>1102</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.4">
<span class='line'>1103</span>  * PolicyQualifierInfo defined in RFC 5280 4.2.1.4&lt;/a>.
<span class='line'>1104</span>  * &lt;pre>
<span class='line'>1105</span>  * PolicyQualifierInfo ::= SEQUENCE {
<span class='line'>1106</span>  *      policyQualifierId  PolicyQualifierId,
<span class='line'>1107</span>  *      qualifier          ANY DEFINED BY policyQualifierId }
<span class='line'>1108</span>  * PolicyQualifierId ::= OBJECT IDENTIFIER ( id-qt-cps | id-qt-unotice )
<span class='line'>1109</span>  * CPSuri ::= IA5String
<span class='line'>1110</span>  * &lt;/pre>
<span class='line'>1111</span>  * Its constructor can have one of following two parameters:
<span class='line'>1112</span>  * &lt;ul>
<span class='line'>1113</span>  * &lt;li>{String}cps - URI string for CPS&lt;/li>
<span class='line'>1114</span>  * &lt;li>{Object}unotice - {@link KJUR.asn1.x509.UserNotice} parameter&lt;/li>
<span class='line'>1115</span>  * &lt;/ul>
<span class='line'>1116</span>  * @example
<span class='line'>1117</span>  * new PolicyQualifierInfo({
<span class='line'>1118</span>  *   cps: "https://example.com/repository/cps"
<span class='line'>1119</span>  * })
<span class='line'>1120</span>  *
<span class='line'>1121</span>  * new PolicyQualifierInfo({
<span class='line'>1122</span>  *   unotice: {
<span class='line'>1123</span>  *     noticeref: { // CA SHOULD NOT use this by RFC
<span class='line'>1124</span>  *       org: {type: "bmp", str: "Sample Org"},
<span class='line'>1125</span>  *       noticenum: [{int: 3}, {hex: "01af"}]
<span class='line'>1126</span>  *     },
<span class='line'>1127</span>  *     exptext: {type: "ia5", str: "Sample Policy"}
<span class='line'>1128</span>  *   }
<span class='line'>1129</span>  * })
<span class='line'>1130</span>  */</span><span class="WHIT">
<span class='line'>1131</span> </span><span class="NAME">KJUR.asn1.x509.PolicyQualifierInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1132</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.PolicyQualifierInfo.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1133</span> </span><span class="WHIT">								   </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1134</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1135</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1136</span> </span><span class="WHIT">	</span><span class="NAME">_DERIA5String</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERIA5String</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1137</span> </span><span class="WHIT">	</span><span class="NAME">_DERObjectIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERObjectIdentifier</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1138</span> </span><span class="WHIT">	</span><span class="NAME">_UserNotice</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509.UserNotice</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1139</span> 
<span class='line'>1140</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1141</span> 
<span class='line'>1142</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1143</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.params.cps</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1144</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT">
<span class='line'>1145</span> </span><span class="WHIT">		</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERObjectIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">oid</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'1.3.6.1.5.5.7.2.1'</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1146</span> </span><span class="WHIT">		</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERIA5String</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">str</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.params.cps</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1147</span> </span><span class="WHIT">	    </span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1148</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">seq.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1149</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1150</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.params.unotice</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1151</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT">
<span class='line'>1152</span> </span><span class="WHIT">		</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERObjectIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">oid</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'1.3.6.1.5.5.7.2.2'</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1153</span> </span><span class="WHIT">		</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_UserNotice</span><span class="PUNC">(</span><span class="NAME">this.params.unotice</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1154</span> </span><span class="WHIT">	    </span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1155</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">seq.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1156</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1157</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1158</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1159</span> 
<span class='line'>1160</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1161</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1162</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1163</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1164</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.PolicyQualifierInfo</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1165</span> 
<span class='line'>1166</span> 
<span class='line'>1167</span> </span><span class="COMM">/**
<span class='line'>1168</span>  * UserNotice ASN.1 structure class
<span class='line'>1169</span>  * @name KJUR.asn1.x509.UserNotice
<span class='line'>1170</span>  * @class UserNotice ASN.1 structure class
<span class='line'>1171</span>  * @param {Array} params associative array of parameters
<span class='line'>1172</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>1173</span>  * @since jsrsasign 8.0.23 asn1x509 1.1.12
<span class='line'>1174</span>  * @description
<span class='line'>1175</span>  * This class represents 
<span class='line'>1176</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.4">
<span class='line'>1177</span>  * UserNotice defined in RFC 5280 4.2.1.4&lt;/a>.
<span class='line'>1178</span>  * &lt;pre>
<span class='line'>1179</span>  * UserNotice ::= SEQUENCE {
<span class='line'>1180</span>  *      noticeRef        NoticeReference OPTIONAL,
<span class='line'>1181</span>  *      explicitText     DisplayText OPTIONAL }
<span class='line'>1182</span>  * &lt;/pre>
<span class='line'>1183</span>  * Its constructor can have following two parameters:
<span class='line'>1184</span>  * &lt;ul>
<span class='line'>1185</span>  * &lt;li>{Object}noticeref - {@link KJUR.asn1.x509.NoticeReference} parameter.
<span class='line'>1186</span>  * This SHALL NOT be set for conforming CA by RFC 5280. (OPTIONAL)&lt;/li>
<span class='line'>1187</span>  * &lt;li>{Object}exptext - explicitText value
<span class='line'>1188</span>  * by {@link KJUR.asn1.x509.DisplayText} parameter (OPTIONAL)&lt;/li>
<span class='line'>1189</span>  * &lt;/ul>
<span class='line'>1190</span>  * @example
<span class='line'>1191</span>  * new UserNotice({
<span class='line'>1192</span>  *   noticeref: {
<span class='line'>1193</span>  *     org: {type: "bmp", str: "Sample Org"},
<span class='line'>1194</span>  *     noticenum: [{int: 3}, {hex: "01af"}]
<span class='line'>1195</span>  *   },
<span class='line'>1196</span>  *   exptext: {type: "ia5", str: "Sample Policy"}
<span class='line'>1197</span>  * })
<span class='line'>1198</span>  */</span><span class="WHIT">
<span class='line'>1199</span> </span><span class="NAME">KJUR.asn1.x509.UserNotice</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1200</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.UserNotice.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1201</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1202</span> </span><span class="WHIT">	</span><span class="NAME">_DERInteger</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DERInteger</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1203</span> </span><span class="WHIT">	</span><span class="NAME">_DisplayText</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.DisplayText</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1204</span> </span><span class="WHIT">	</span><span class="NAME">_NoticeReference</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.NoticeReference</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1205</span> 
<span class='line'>1206</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1207</span> 
<span class='line'>1208</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1209</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1210</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.params.noticeref</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1211</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_NoticeReference</span><span class="PUNC">(</span><span class="NAME">this.params.noticeref</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1212</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1213</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.params.exptext</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1214</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DisplayText</span><span class="PUNC">(</span><span class="NAME">this.params.exptext</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1215</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1216</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1217</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">seq.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1218</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1219</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1220</span> 
<span class='line'>1221</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1222</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1223</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1224</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1225</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.UserNotice</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1226</span> 
<span class='line'>1227</span> </span><span class="COMM">/**
<span class='line'>1228</span>  * NoticeReference ASN.1 structure class
<span class='line'>1229</span>  * @name KJUR.asn1.x509.NoticeReference
<span class='line'>1230</span>  * @class NoticeReference ASN.1 structure class
<span class='line'>1231</span>  * @param {Array} params associative array of parameters
<span class='line'>1232</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>1233</span>  * @since jsrsasign 8.0.23 asn1x509 1.1.12
<span class='line'>1234</span>  * @description
<span class='line'>1235</span>  * This class represents 
<span class='line'>1236</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.4">
<span class='line'>1237</span>  * NoticeReference defined in RFC 5280 4.2.1.4&lt;/a>.
<span class='line'>1238</span>  * &lt;pre>
<span class='line'>1239</span>  * NoticeReference ::= SEQUENCE {
<span class='line'>1240</span>  *      organization     DisplayText,
<span class='line'>1241</span>  *      noticeNumbers    SEQUENCE OF INTEGER }
<span class='line'>1242</span>  * &lt;/pre>
<span class='line'>1243</span>  * Its constructor can have following two parameters:
<span class='line'>1244</span>  * &lt;ul>
<span class='line'>1245</span>  * &lt;li>{Object}org - organization by {@link KJUR.asn1.x509.DisplayText}
<span class='line'>1246</span>  * parameter.&lt;/li>
<span class='line'>1247</span>  * &lt;li>{Object}noticenum - noticeNumbers value by an array of
<span class='line'>1248</span>  * {@link KJUR.asn1.DERInteger} parameter&lt;/li>
<span class='line'>1249</span>  * &lt;/ul>
<span class='line'>1250</span>  * @example
<span class='line'>1251</span>  * new NoticeReference({
<span class='line'>1252</span>  *   org: {type: "bmp", str: "Sample Org"},
<span class='line'>1253</span>  *   noticenum: [{int: 3}, {hex: "01af"}]
<span class='line'>1254</span>  * })
<span class='line'>1255</span>  */</span><span class="WHIT">
<span class='line'>1256</span> </span><span class="NAME">KJUR.asn1.x509.NoticeReference</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1257</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.NoticeReference.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1258</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1259</span> </span><span class="WHIT">	</span><span class="NAME">_DERInteger</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DERInteger</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1260</span> </span><span class="WHIT">	</span><span class="NAME">_DisplayText</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.DisplayText</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1261</span> 
<span class='line'>1262</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1263</span> 
<span class='line'>1264</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1265</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1266</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.params.org</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1267</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DisplayText</span><span class="PUNC">(</span><span class="NAME">this.params.org</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1268</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1269</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.params.noticenum</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1270</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aNoticeNum</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1271</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aNumParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params.noticenum</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1272</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aNumParam.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1273</span> </span><span class="WHIT">		</span><span class="NAME">aNoticeNum.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERInteger</span><span class="PUNC">(</span><span class="NAME">aNumParam</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1274</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1275</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">aNoticeNum</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1276</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1277</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a.length</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"parameter is empty"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1278</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1279</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">seq.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1280</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1281</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1282</span> 
<span class='line'>1283</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1284</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1285</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1286</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1287</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.NoticeReference</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1288</span> 
<span class='line'>1289</span> </span><span class="COMM">/**
<span class='line'>1290</span>  * DisplayText ASN.1 structure class
<span class='line'>1291</span>  * @name KJUR.asn1.x509.DisplayText
<span class='line'>1292</span>  * @class DisplayText ASN.1 structure class
<span class='line'>1293</span>  * @param {Array} params associative array of parameters
<span class='line'>1294</span>  * @extends KJUR.asn1.DERAbstractString
<span class='line'>1295</span>  * @since jsrsasign 8.0.23 asn1x509 1.1.12
<span class='line'>1296</span>  * @description
<span class='line'>1297</span>  * This class represents 
<span class='line'>1298</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.4">
<span class='line'>1299</span>  * DisplayText defined in RFC 5280 4.2.1.4&lt;/a>.
<span class='line'>1300</span>  * &lt;pre>
<span class='line'>1301</span>  * -- from RFC 5280 Appendix A
<span class='line'>1302</span>  * DisplayText ::= CHOICE {
<span class='line'>1303</span>  *      ia5String        IA5String      (SIZE (1..200)),
<span class='line'>1304</span>  *      visibleString    VisibleString  (SIZE (1..200)),
<span class='line'>1305</span>  *      bmpString        BMPString      (SIZE (1..200)),
<span class='line'>1306</span>  *      utf8String       UTF8String     (SIZE (1..200)) }
<span class='line'>1307</span>  * &lt;/pre>
<span class='line'>1308</span>  * {@link KJUR.asn1.DERAbstractString} parameters and methods
<span class='line'>1309</span>  * can be used.
<span class='line'>1310</span>  * Its constructor can also have following parameter:
<span class='line'>1311</span>  * &lt;ul>
<span class='line'>1312</span>  * &lt;li>{String} type - DirectoryString type of DisplayText.
<span class='line'>1313</span>  * "ia5" for IA5String, "vis" for VisibleString,
<span class='line'>1314</span>  * "bmp" for BMPString and "utf8" for UTF8String.
<span class='line'>1315</span>  * Default is "utf8". (OPTIONAL)&lt;/li>
<span class='line'>1316</span>  * &lt;/ul>
<span class='line'>1317</span>  * @example
<span class='line'>1318</span>  * new DisplayText({type: "bmp", str: "Sample Org"})
<span class='line'>1319</span>  * new DisplayText({type: "ia5", str: "Sample Org"})
<span class='line'>1320</span>  * new DisplayText({str: "Sample Org"})
<span class='line'>1321</span>  */</span><span class="WHIT">
<span class='line'>1322</span> </span><span class="NAME">KJUR.asn1.x509.DisplayText</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1323</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.DisplayText.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1324</span> 
<span class='line'>1325</span> </span><span class="WHIT">    </span><span class="NAME">this.hT</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"0c"</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// DEFAULT "utf8"</span><span class="WHIT">
<span class='line'>1326</span> 
<span class='line'>1327</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1328</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.type</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"ia5"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1329</span> </span><span class="WHIT">	    </span><span class="NAME">this.hT</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"16"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1330</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.type</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"vis"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1331</span> </span><span class="WHIT">	    </span><span class="NAME">this.hT</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"1a"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1332</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.type</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"bmp"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1333</span> </span><span class="WHIT">	    </span><span class="NAME">this.hT</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"1e"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1334</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1335</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1336</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1337</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.DisplayText</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DERAbstractString</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1338</span> </span><span class="COMM">// ===== END CertificatePolicies related classes =====</span><span class="WHIT">
<span class='line'>1339</span> 
<span class='line'>1340</span> </span><span class="COMM">// =====================================================================</span><span class="WHIT">
<span class='line'>1341</span> 
<span class='line'>1342</span> </span><span class="COMM">/**
<span class='line'>1343</span>  * PolicyMappings ASN.1 structure class&lt;br/>
<span class='line'>1344</span>  * @name KJUR.asn1.x509.PolicyMappings
<span class='line'>1345</span>  * @class PolicyMappings ASN.1 structure class
<span class='line'>1346</span>  * @param {Array} params associative array of parameters
<span class='line'>1347</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>1348</span>  * @since jsrsasign 10.6.1 asn1x509 2.1.17
<span class='line'>1349</span>  * @description
<span class='line'>1350</span>  * This class represents 
<span class='line'>1351</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.5">
<span class='line'>1352</span>  * PolicyMappings extension defined in RFC 5280 4.2.1.5&lt;/a>.
<span class='line'>1353</span>  * &lt;pre>
<span class='line'>1354</span>  * id-ce-policyMappings OBJECT IDENTIFIER ::=  { id-ce 33 }
<span class='line'>1355</span>  * PolicyMappings ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE {
<span class='line'>1356</span>  *    issuerDomainPolicy      CertPolicyId,
<span class='line'>1357</span>  *    subjectDomainPolicy     CertPolicyId }
<span class='line'>1358</span>  * &lt;/pre>
<span class='line'>1359</span>  * Its constructor can have following parameters:
<span class='line'>1360</span>  * &lt;ul>
<span class='line'>1361</span>  * &lt;li>array - Array: one or more pairs of OIDS&lt;/li>
<span class='line'>1362</span>  * &lt;li>critical - boolean: critical flag&lt;/li>
<span class='line'>1363</span>  * &lt;/ul>
<span class='line'>1364</span>  * OID in "array" can use an OID name registered in
<span class='line'>1365</span>  * {@link KJUR.asn1.x509.OID} such as "anyPolicy".
<span class='line'>1366</span>  * @example
<span class='line'>1367</span>  * e1 = new KJUR.asn1.x509.PolicyMappings({
<span class='line'>1368</span>  *   array: [["1.2.3", "0.1.2"], ["anyPolicy", "1.2.4"]],
<span class='line'>1369</span>  *   critical: true
<span class='line'>1370</span>  * });
<span class='line'>1371</span>  */</span><span class="WHIT">
<span class='line'>1372</span> </span><span class="NAME">KJUR.asn1.x509.PolicyMappings</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1373</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.PolicyMappings.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1374</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1375</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1376</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1377</span> </span><span class="WHIT">	</span><span class="NAME">_newObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.ASN1Util.newObject</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1378</span> 
<span class='line'>1379</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1380</span> 
<span class='line'>1381</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1382</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1383</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aItem</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1384</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">params.array.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1385</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aOid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.array</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1386</span> </span><span class="WHIT">	    </span><span class="NAME">aItem.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">seq</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">{</span><span class="NAME">oid</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">aOid</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">oid</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">aOid</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1387</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1388</span> </span><span class="WHIT">	</span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_newObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">seq</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">aItem</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1389</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1390</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1391</span> 
<span class='line'>1392</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"2.5.29.33"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1393</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1394</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1395</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1396</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1397</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.PolicyMappings</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1398</span> 
<span class='line'>1399</span> </span><span class="COMM">/**
<span class='line'>1400</span>  * PolicyConstraints ASN.1 structure class&lt;br/>
<span class='line'>1401</span>  * @name KJUR.asn1.x509.PolicyConstraints
<span class='line'>1402</span>  * @class PolicyConstraints ASN.1 structure class
<span class='line'>1403</span>  * @param {Array} params associative array of parameters
<span class='line'>1404</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>1405</span>  * @since jsrsasign 10.6.1 asn1x509 2.1.17
<span class='line'>1406</span>  * @description
<span class='line'>1407</span>  * This class represents 
<span class='line'>1408</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.11">
<span class='line'>1409</span>  * PolicyConstraints extension defined in RFC 5280 4.2.1.11&lt;/a>.
<span class='line'>1410</span>  * &lt;pre>
<span class='line'>1411</span>  * id-ce-policyConstraints OBJECT IDENTIFIER ::=  { id-ce 36 }
<span class='line'>1412</span>  * PolicyConstraints ::= SEQUENCE {
<span class='line'>1413</span>  *    requireExplicitPolicy  [0] SkipCerts OPTIONAL,
<span class='line'>1414</span>  *    inhibitPolicyMapping   [1] SkipCerts OPTIONAL }
<span class='line'>1415</span>  * SkipCerts ::= INTEGER (0..MAX)
<span class='line'>1416</span>  * &lt;/pre>
<span class='line'>1417</span>  * Its constructor can have following parameters:
<span class='line'>1418</span>  * &lt;ul>
<span class='line'>1419</span>  * &lt;li>reqexp - integer: the number of additional certificates that may appear 
<span class='line'>1420</span>  * in the path before an explicit policy is required for the entire path.&lt;/li>
<span class='line'>1421</span>  * &lt;li>inhibit - integer: the number of additional certificates that may appear 
<span class='line'>1422</span>  * in the path before policy mapping is no longer permitted.&lt;/li>
<span class='line'>1423</span>  * &lt;li>critical - boolean: critical flag&lt;/li>
<span class='line'>1424</span>  * &lt;/ul>
<span class='line'>1425</span>  * @example
<span class='line'>1426</span>  * e1 = new KJUR.asn1.x509.PolicyConstraints({
<span class='line'>1427</span>  *   reqexp: 3,
<span class='line'>1428</span>  *   inhibit: 3,
<span class='line'>1429</span>  *   critical: true
<span class='line'>1430</span>  * });
<span class='line'>1431</span>  */</span><span class="WHIT">
<span class='line'>1432</span> </span><span class="NAME">KJUR.asn1.x509.PolicyConstraints</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1433</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.PolicyConstraints.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1434</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1435</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1436</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1437</span> </span><span class="WHIT">	</span><span class="NAME">_newObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.ASN1Util.newObject</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1438</span> 
<span class='line'>1439</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1440</span> 
<span class='line'>1441</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1442</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1443</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aItem</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1444</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.reqexp</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1445</span> </span><span class="WHIT">	    </span><span class="NAME">aItem.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">tag</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">tagi</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"80"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">"int"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.reqexp</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1446</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1447</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.inhibit</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1448</span> </span><span class="WHIT">	    </span><span class="NAME">aItem.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">tag</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">tagi</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"81"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">"int"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.inhibit</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1449</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1450</span> 
<span class='line'>1451</span> </span><span class="WHIT">	</span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_newObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">"seq"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">aItem</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1452</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1453</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1454</span> 
<span class='line'>1455</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"2.5.29.36"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1456</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1457</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1458</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1459</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1460</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.PolicyConstraints</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1461</span> 
<span class='line'>1462</span> </span><span class="COMM">/**
<span class='line'>1463</span>  * InhibitAnyPolicy ASN.1 structure class&lt;br/>
<span class='line'>1464</span>  * @name KJUR.asn1.x509.InhibitAnyPolicy
<span class='line'>1465</span>  * @class InhibitAnyPolicy ASN.1 structure class
<span class='line'>1466</span>  * @param {Array} params associative array of parameters
<span class='line'>1467</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>1468</span>  * @since jsrsasign 10.6.1 asn1x509 2.1.17
<span class='line'>1469</span>  * @description
<span class='line'>1470</span>  * This class represents 
<span class='line'>1471</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.14">
<span class='line'>1472</span>  * InhibitAnyPolicy extension defined in RFC 5280 4.2.1.14&lt;/a>.
<span class='line'>1473</span>  * &lt;pre>
<span class='line'>1474</span>  * id-ce-inhibitAnyPolicy OBJECT IDENTIFIER ::=  { id-ce 54 }
<span class='line'>1475</span>  * InhibitAnyPolicy ::= SkipCerts
<span class='line'>1476</span>  * SkipCerts ::= INTEGER (0..MAX)
<span class='line'>1477</span>  * &lt;/pre>
<span class='line'>1478</span>  * Its constructor can have following parameters:
<span class='line'>1479</span>  * &lt;ul>
<span class='line'>1480</span>  * &lt;li>skip - the number of additional non-self-issued certificates that may appear
<span class='line'>1481</span>  * in the path before anyPolicy is no longer permitted&lt;li>
<span class='line'>1482</span>  * &lt;li>critical - boolean: critical flag&lt;/li>
<span class='line'>1483</span>  * &lt;/ul>
<span class='line'>1484</span>  * @example
<span class='line'>1485</span>  * e1 = new KJUR.asn1.x509.InhibitAnyPolicy({
<span class='line'>1486</span>  *   skip: 5,
<span class='line'>1487</span>  *   critical: true
<span class='line'>1488</span>  * });
<span class='line'>1489</span>  */</span><span class="WHIT">
<span class='line'>1490</span> </span><span class="NAME">KJUR.asn1.x509.InhibitAnyPolicy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1491</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.InhibitAnyPolicy.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1492</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1493</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1494</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1495</span> </span><span class="WHIT">	</span><span class="NAME">_newObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.ASN1Util.newObject</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1496</span> 
<span class='line'>1497</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1498</span> 
<span class='line'>1499</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1500</span> </span><span class="WHIT">	</span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_newObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">"int"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.params.skip</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1501</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1502</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1503</span> 
<span class='line'>1504</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"2.5.29.54"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1505</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1506</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1507</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1508</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1509</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.InhibitAnyPolicy</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1510</span> 
<span class='line'>1511</span> </span><span class="COMM">// =====================================================================</span><span class="WHIT">
<span class='line'>1512</span> </span><span class="COMM">/**
<span class='line'>1513</span>  * NameConstraints ASN.1 structure class&lt;br/>
<span class='line'>1514</span>  * @name KJUR.asn1.x509.NameConstraints
<span class='line'>1515</span>  * @class NameConstraints ASN.1 structure class
<span class='line'>1516</span>  * @param {Array} params associative array of parameters
<span class='line'>1517</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>1518</span>  * @since jsrsasign 10.5.16 asn1x509 2.1.13
<span class='line'>1519</span>  * @see X509#getExtNameConstraints
<span class='line'>1520</span>  * @see KJUR.asn1.x509.GeneralSubtree
<span class='line'>1521</span>  * @see KJUR.asn1.x509.GeneralName
<span class='line'>1522</span> 
<span class='line'>1523</span>  * @description
<span class='line'>1524</span>  * This class provides X.509v3 NameConstraints extension.
<span class='line'>1525</span>  * defined in 
<span class='line'>1526</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.10">
<span class='line'>1527</span>  * RFC 5280 4.2.1.10&lt;/a>.
<span class='line'>1528</span>  * &lt;pre>
<span class='line'>1529</span>  * id-ce-nameConstraints OBJECT IDENTIFIER ::=  { id-ce 30 }
<span class='line'>1530</span>  * NameConstraints ::= SEQUENCE {
<span class='line'>1531</span>  *   permittedSubtrees  [0]  GeneralSubtrees OPTIONAL,
<span class='line'>1532</span>  *   excludedSubtrees   [1]  GeneralSubtrees OPTIONAL }
<span class='line'>1533</span>  * GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree
<span class='line'>1534</span>  * GeneralSubtree ::= SEQUENCE {
<span class='line'>1535</span>  *   base           GeneralName,
<span class='line'>1536</span>  *   minimum   [0]  BaseDistance DEFAULT 0,
<span class='line'>1537</span>  *   maximum   [1]  BaseDistance OPTIONAL }
<span class='line'>1538</span>  * BaseDistance ::= INTEGER (0..MAX)
<span class='line'>1539</span>  * &lt;/pre>
<span class='line'>1540</span>  *
<span class='line'>1541</span>  * @example
<span class='line'>1542</span>  * new NameConstraints({permit: [{dns: "example.com"}], critical: true})
<span class='line'>1543</span>  * new NameConstraints({exclude: [{uri: "example.com"}], critical: true})
<span class='line'>1544</span>  * new NameConstraints({exclude: [{dn: "/C=JP/O=T1"}], critical: true})
<span class='line'>1545</span>  * new NameConstraints({
<span class='line'>1546</span>  *   critical: true,
<span class='line'>1547</span>  *   permit: [{dn: "/C=JP/O=T1"}],
<span class='line'>1548</span>  *   exclude: [{dn: "/C=US/O=T1", max: 2}]})
<span class='line'>1549</span>  */</span><span class="WHIT">
<span class='line'>1550</span> </span><span class="NAME">KJUR.asn1.x509.NameConstraints</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1551</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.NameConstraints.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1552</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1553</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1554</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1555</span> </span><span class="WHIT">	</span><span class="NAME">_newObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.ASN1Util.newObject</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1556</span> </span><span class="WHIT">	</span><span class="NAME">_GeneralSubtree</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.GeneralSubtree</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1557</span> 
<span class='line'>1558</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1559</span> 
<span class='line'>1560</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1561</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1562</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aItem</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1563</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.permit</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>1564</span> </span><span class="WHIT">	    </span><span class="NAME">params.permit.length</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1565</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aPermit</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1566</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">params.permit.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1567</span> </span><span class="WHIT">		</span><span class="NAME">aPermit.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_GeneralSubtree</span><span class="PUNC">(</span><span class="NAME">params.permit</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1568</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1569</span> </span><span class="WHIT">	    </span><span class="NAME">aItem.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">tag</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">tagi</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"a0"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">seq</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">aPermit</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1570</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1571</span> 
<span class='line'>1572</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.exclude</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>1573</span> </span><span class="WHIT">	    </span><span class="NAME">params.exclude.length</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1574</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aExclude</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1575</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">params.exclude.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1576</span> </span><span class="WHIT">		</span><span class="NAME">aExclude.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_GeneralSubtree</span><span class="PUNC">(</span><span class="NAME">params.exclude</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1577</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1578</span> </span><span class="WHIT">	    </span><span class="NAME">aItem.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">tag</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">tagi</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"a1"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">seq</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">aExclude</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1579</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1580</span> 
<span class='line'>1581</span> </span><span class="WHIT">	</span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_newObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">seq</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">aItem</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1582</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1583</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1584</span> 
<span class='line'>1585</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"2.5.29.30"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1586</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1587</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1588</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.NameConstraints</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1589</span> 
<span class='line'>1590</span> </span><span class="COMM">/**
<span class='line'>1591</span>  * GeneralSubtree ASN.1 structure class&lt;br/>
<span class='line'>1592</span>  * @name KJUR.asn1.x509.GeneralSubtree
<span class='line'>1593</span>  * @class GeneralSubtree ASN.1 structure class
<span class='line'>1594</span>  * @since jsrsasign 10.5.16 asn1x509 2.1.13
<span class='line'>1595</span>  * @see KJUR.asn1.x509.NameConstraints
<span class='line'>1596</span>  * @see KJUR.asn1.x509.GeneralName
<span class='line'>1597</span>  * @see X509#getExtNameConstraints
<span class='line'>1598</span>  * @see X509#getGeneralSubtree
<span class='line'>1599</span>  *
<span class='line'>1600</span>  * @description
<span class='line'>1601</span>  * This class provides a encoder for GeneralSubtree 
<span class='line'>1602</span>  * defined in 
<span class='line'>1603</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.10">
<span class='line'>1604</span>  * RFC 5280 4.2.1.10&lt;/a>. 
<span class='line'>1605</span>  * This will be used for nameConstraints extension.
<span class='line'>1606</span>  * &lt;br>
<span class='line'>1607</span>  * Here is definition of the ASN.1 syntax:
<span class='line'>1608</span>  * &lt;pre>
<span class='line'>1609</span>  * GeneralSubtree ::= SEQUENCE {
<span class='line'>1610</span>  *   base           GeneralName,
<span class='line'>1611</span>  *   minimum   [0]  BaseDistance DEFAULT 0,
<span class='line'>1612</span>  *   maximum   [1]  BaseDistance OPTIONAL }
<span class='line'>1613</span>  * BaseDistance ::= INTEGER (0..MAX)
<span class='line'>1614</span>  * &lt;/pre>
<span class='line'>1615</span>  * An argument for constructor is the same as
<span class='line'>1616</span>  * {@link KJUR.asn1.x509.GeneralName} except
<span class='line'>1617</span>  * this has following optional members:
<span class='line'>1618</span>  * &lt;ul>
<span class='line'>1619</span>  * &lt;li>min - {Number} value for the minimum field&lt;/li>
<span class='line'>1620</span>  * &lt;li>max - {Number} value for the maximum field&lt;/li>
<span class='line'>1621</span>  * &lt;/ul>
<span class='line'>1622</span>  * Please note that min and max can't be specified since
<span class='line'>1623</span>  * they are prohibited in RFC 5280.
<span class='line'>1624</span>  *
<span class='line'>1625</span>  * @example
<span class='line'>1626</span>  * new GeneralSubtree({dns: "example.com"})
<span class='line'>1627</span>  * new GeneralSubtree({uri: ".example.com"})
<span class='line'>1628</span>  * new GeneralSubtree({dn: "/C=JP/O=Test1"})
<span class='line'>1629</span>  */</span><span class="WHIT">
<span class='line'>1630</span> </span><span class="NAME">KJUR.asn1.x509.GeneralSubtree</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1631</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.GeneralSubtree.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1632</span> 
<span class='line'>1633</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1634</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1635</span> </span><span class="WHIT">	</span><span class="NAME">_GeneralName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.GeneralName</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1636</span> </span><span class="WHIT">	</span><span class="NAME">_newObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.ASN1Util.newObject</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1637</span> 
<span class='line'>1638</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1639</span> 
<span class='line'>1640</span> </span><span class="WHIT">    </span><span class="NAME">this.setByParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1641</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1642</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1643</span> 
<span class='line'>1644</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1645</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1646</span> 
<span class='line'>1647</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aItem</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_GeneralName</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1648</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.min</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1649</span> </span><span class="WHIT">	    </span><span class="NAME">aItem.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">tag</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">tagi</span><span class="PUNC">:</span><span class="STRN">"80"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">"int"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.min</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1650</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.max</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1651</span> </span><span class="WHIT">	    </span><span class="NAME">aItem.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">tag</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">tagi</span><span class="PUNC">:</span><span class="STRN">"81"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">"int"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.max</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1652</span> 
<span class='line'>1653</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dSeq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_newObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">seq</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">aItem</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1654</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">dSeq.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1655</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1656</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1657</span> 
<span class='line'>1658</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1659</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1660</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.GeneralSubtree</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1661</span> 
<span class='line'>1662</span> </span><span class="COMM">// =====================================================================</span><span class="WHIT">
<span class='line'>1663</span> </span><span class="COMM">/**
<span class='line'>1664</span>  * KeyUsage ASN.1 structure class
<span class='line'>1665</span>  * @name KJUR.asn1.x509.ExtKeyUsage
<span class='line'>1666</span>  * @class ExtKeyUsage ASN.1 structure class
<span class='line'>1667</span>  * @param {Array} params associative array of parameters
<span class='line'>1668</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>1669</span>  * @description
<span class='line'>1670</span>  * @example
<span class='line'>1671</span>  * e1 = new KJUR.asn1.x509.ExtKeyUsage({
<span class='line'>1672</span>  *   critical: true,
<span class='line'>1673</span>  *   array: [
<span class='line'>1674</span>  *     {oid: '2.5.29.37.0'},  // anyExtendedKeyUsage
<span class='line'>1675</span>  *     {name: 'clientAuth'},
<span class='line'>1676</span>  *     "1.2.3.4",
<span class='line'>1677</span>  *     "serverAuth"
<span class='line'>1678</span>  *   ]
<span class='line'>1679</span>  * });
<span class='line'>1680</span>  * // id-ce-extKeyUsage OBJECT IDENTIFIER ::= { id-ce 37 }
<span class='line'>1681</span>  * // ExtKeyUsageSyntax ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId
<span class='line'>1682</span>  * // KeyPurposeId ::= OBJECT IDENTIFIER
<span class='line'>1683</span>  */</span><span class="WHIT">
<span class='line'>1684</span> </span><span class="NAME">KJUR.asn1.x509.ExtKeyUsage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1685</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.ExtKeyUsage.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1686</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1687</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1688</span> 
<span class='line'>1689</span> </span><span class="WHIT">    </span><span class="NAME">this.setPurposeArray</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">purposeArray</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1690</span> </span><span class="WHIT">        </span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1691</span> </span><span class="WHIT">        </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">purposeArray.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1692</span> </span><span class="WHIT">            </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERObjectIdentifier</span><span class="PUNC">(</span><span class="NAME">purposeArray</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1693</span> </span><span class="WHIT">            </span><span class="NAME">this.asn1ExtnValue.appendASN1Object</span><span class="PUNC">(</span><span class="NAME">o</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1694</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1695</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1696</span> 
<span class='line'>1697</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1698</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1699</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1700</span> 
<span class='line'>1701</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"2.5.29.37"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1702</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1703</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.array</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1704</span> </span><span class="WHIT">            </span><span class="NAME">this.setPurposeArray</span><span class="PUNC">(</span><span class="NAME">params.array</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1705</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1706</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1707</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1708</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.ExtKeyUsage</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1709</span> 
<span class='line'>1710</span> </span><span class="COMM">/**
<span class='line'>1711</span>  * AuthorityKeyIdentifier ASN.1 structure class
<span class='line'>1712</span>  * @name KJUR.asn1.x509.AuthorityKeyIdentifier
<span class='line'>1713</span>  * @class AuthorityKeyIdentifier ASN.1 structure class
<span class='line'>1714</span>  * @param {Array} params associative array of parameters (ex. {kid: {hex: '89ab...'}, critical: true})
<span class='line'>1715</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>1716</span>  * @since asn1x509 1.0.8
<span class='line'>1717</span>  * @description
<span class='line'>1718</span>  * This class represents ASN.1 structure for &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.1">AuthorityKeyIdentifier in RFC 5280&lt;/a>.
<span class='line'>1719</span>  * Constructor of this class may have following parameters.: 
<span class='line'>1720</span>  * &lt;ul>
<span class='line'>1721</span>  * &lt;li>kid - When key object (RSA, KJUR.crypto.ECDSA/DSA) or PEM string of issuing authority public key or issuer certificate is specified, key identifier will be automatically calculated by the method specified in RFC 5280. When a hexadecimal string is specifed, kid will be set explicitly by it.&lt;/li>
<span class='line'>1722</span>  * &lt;li>isscert - When PEM string of authority certificate is specified, both authorityCertIssuer and authorityCertSerialNumber will be set by the certificate.&lt;/li>
<span class='line'>1723</span>  * &lt;li>issuer - {@link KJUR.asn1.x509.X500Name} parameter to specify issuer name explicitly.&lt;/li>
<span class='line'>1724</span>  * &lt;li>sn - hexadecimal string to specify serial number explicitly.&lt;/li>
<span class='line'>1725</span>  * &lt;li>critical - boolean to specify criticality of this extension
<span class='line'>1726</span>  * however conforming CA must mark this extension as non-critical in RFC 5280.&lt;/li>
<span class='line'>1727</span>  * &lt;/ul>
<span class='line'>1728</span>  * 
<span class='line'>1729</span>  * &lt;pre>
<span class='line'>1730</span>  * d-ce-authorityKeyIdentifier OBJECT IDENTIFIER ::=  { id-ce 35 }
<span class='line'>1731</span>  * AuthorityKeyIdentifier ::= SEQUENCE {
<span class='line'>1732</span>  *    keyIdentifier             [0] KeyIdentifier           OPTIONAL,
<span class='line'>1733</span>  *    authorityCertIssuer       [1] GeneralNames            OPTIONAL,
<span class='line'>1734</span>  *    authorityCertSerialNumber [2] CertificateSerialNumber OPTIONAL  }
<span class='line'>1735</span>  * KeyIdentifier ::= OCTET STRING
<span class='line'>1736</span>  * &lt;/pre>
<span class='line'>1737</span>  *
<span class='line'>1738</span>  * @example
<span class='line'>1739</span>  * // 1. kid by key object
<span class='line'>1740</span>  * keyobj = KEYUTIL.getKey("-----BEGIN PUBLIC KEY...");
<span class='line'>1741</span>  * e1 = new KJUR.asn1.x509.AuthorityKeyIdentifier({kid: keyobj});
<span class='line'>1742</span>  * // 2. kid by PEM string of authority certificate or public key
<span class='line'>1743</span>  * e1 = new KJUR.asn1.x509.AuthorityKeyIdentifier({kid: "-----BEGIN..."});
<span class='line'>1744</span>  * // 3. specify kid explicitly
<span class='line'>1745</span>  * e1 = new KJUR.asn1.x509.AuthorityKeyIdentifier({kid: "8ab1d3..."});
<span class='line'>1746</span>  * });
<span class='line'>1747</span>  * // 4. issuer and serial number by auhtority PEM certificate
<span class='line'>1748</span>  * e1 = new KJUR.asn1.x509.AuthorityKeyIdentifier({isscert: "-----BEGIN..."});
<span class='line'>1749</span>  * // 5. issuer and serial number explicitly
<span class='line'>1750</span>  * e1 = new KJUR.asn1.x509.AuthorityKeyIdentifier({
<span class='line'>1751</span>  *   issuer: {ldapstr: "O=test,C=US"},
<span class='line'>1752</span>  *   sn: {hex: "1ac7..."}});
<span class='line'>1753</span>  * // 6. combination
<span class='line'>1754</span>  * e1 = new KJUR.asn1.x509.AuthorityKeyIdentifier({
<span class='line'>1755</span>  *   kid: "-----BEGIN CERTIFICATE...",
<span class='line'>1756</span>  *   isscert: "-----BEGIN CERTIFICATE..."});
<span class='line'>1757</span>  */</span><span class="WHIT">
<span class='line'>1758</span> </span><span class="NAME">KJUR.asn1.x509.AuthorityKeyIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1759</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.AuthorityKeyIdentifier.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1760</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1761</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1762</span> </span><span class="WHIT">	</span><span class="NAME">_DERTaggedObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERTaggedObject</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1763</span> </span><span class="WHIT">	</span><span class="NAME">_GeneralNames</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509.GeneralNames</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1764</span> </span><span class="WHIT">	</span><span class="NAME">_isKey</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.crypto.Util.isKey</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1765</span> 
<span class='line'>1766</span> </span><span class="WHIT">    </span><span class="NAME">this.asn1KID</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1767</span> </span><span class="WHIT">    </span><span class="NAME">this.asn1CertIssuer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// X500Name hTLV</span><span class="WHIT">
<span class='line'>1768</span> </span><span class="WHIT">    </span><span class="NAME">this.asn1CertSN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1769</span> 
<span class='line'>1770</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1771</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Array</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1772</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.asn1KID</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1773</span> </span><span class="WHIT">            </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERTaggedObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'explicit'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1774</span> </span><span class="WHIT">                                         </span><span class="STRN">'tag'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'80'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1775</span> </span><span class="WHIT">                                         </span><span class="STRN">'obj'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.asn1KID</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1776</span> 
<span class='line'>1777</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.asn1CertIssuer</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1778</span> </span><span class="WHIT">            </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERTaggedObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'explicit'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1779</span> </span><span class="WHIT">                                         </span><span class="STRN">'tag'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'a1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1780</span> </span><span class="WHIT">                                         </span><span class="STRN">'obj'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_GeneralNames</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="PUNC">{</span><span class="NAME">dn</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.asn1CertIssuer</span><span class="PUNC">}</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1781</span> 
<span class='line'>1782</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.asn1CertSN</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1783</span> </span><span class="WHIT">            </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERTaggedObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'explicit'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1784</span> </span><span class="WHIT">                                         </span><span class="STRN">'tag'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'82'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1785</span> </span><span class="WHIT">                                         </span><span class="STRN">'obj'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.asn1CertSN</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1786</span> 
<span class='line'>1787</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1Seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'array'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1788</span> </span><span class="WHIT">        </span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">asn1Seq</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1789</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1790</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1791</span> 
<span class='line'>1792</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1793</span>      * set keyIdentifier value by DEROctetString parameter, key object or PEM file
<span class='line'>1794</span>      * @name setKIDByParam
<span class='line'>1795</span>      * @memberOf KJUR.asn1.x509.AuthorityKeyIdentifier#
<span class='line'>1796</span>      * @function
<span class='line'>1797</span>      * @param {Array} param parameter to set key identifier
<span class='line'>1798</span>      * @since asn1x509 1.0.8
<span class='line'>1799</span>      * @description
<span class='line'>1800</span>      * This method will set keyIdentifier by param.
<span class='line'>1801</span>      * Its key identifier value can be set by following type of param argument:
<span class='line'>1802</span>      * &lt;ul>
<span class='line'>1803</span>      * &lt;li>{str: "123"} - by raw string&lt;/li>
<span class='line'>1804</span>      * &lt;li>{hex: "01af..."} - by hexadecimal value&lt;/li>
<span class='line'>1805</span>      * &lt;li>RSAKey/DSA/ECDSA - by RSAKey, KJUR.crypto.{DSA/ECDSA} public key object.
<span class='line'>1806</span>      * key identifier value will be calculated by the method described in
<span class='line'>1807</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.2">RFC 5280 4.2.1.2 (1)&lt;/a>.
<span class='line'>1808</span>      * &lt;/li>
<span class='line'>1809</span>      * &lt;li>certificate PEM string - extract subjectPublicKeyInfo from specified PEM
<span class='line'>1810</span>      * certificate and
<span class='line'>1811</span>      * key identifier value will be calculated by the method described in
<span class='line'>1812</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.2">RFC 5280 4.2.1.2 (1)&lt;/a>.
<span class='line'>1813</span>      * &lt;li>PKCS#1/#8 public key PEM string - pem will be converted to a key object and
<span class='line'>1814</span>      * to PKCS#8 ASN.1 structure then calculate 
<span class='line'>1815</span>      * a key identifier value will be calculated by the method described in
<span class='line'>1816</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.2">RFC 5280 4.2.1.2 (1)&lt;/a>.
<span class='line'>1817</span>      * &lt;/ul>
<span class='line'>1818</span>      *
<span class='line'>1819</span>      * NOTE1: Automatic key identifier calculation is supported
<span class='line'>1820</span>      * since jsrsasign 8.0.16.
<span class='line'>1821</span>      *
<span class='line'>1822</span>      * @see KEYUTIL.getKeyID
<span class='line'>1823</span>      * 
<span class='line'>1824</span>      * @example
<span class='line'>1825</span>      * o = new KJUR.asn1.x509.AuthorityKeyIdentifier();
<span class='line'>1826</span>      * // set by hexadecimal string
<span class='line'>1827</span>      * o.setKIDByParam({hex: '1ad9...'});
<span class='line'>1828</span>      * // set by SubjectPublicKeyInfo of PEM certificate string
<span class='line'>1829</span>      * o.setKIDByParam("-----BEGIN CERTIFICATE...");
<span class='line'>1830</span>      * // set by PKCS#8 PEM public key string
<span class='line'>1831</span>      * o.setKIDByParam("-----BEGIN PUBLIC KEY...");
<span class='line'>1832</span>      * // set by public key object
<span class='line'>1833</span>      * pubkey = KEYUTIL.getKey("-----BEGIN CERTIFICATE...");
<span class='line'>1834</span>      * o.setKIDByParam(pubkey);
<span class='line'>1835</span>      */</span><span class="WHIT">
<span class='line'>1836</span> </span><span class="WHIT">    </span><span class="NAME">this.setKIDByParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1837</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">param.str</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>1838</span> </span><span class="WHIT">	    </span><span class="NAME">param.hex</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1839</span> </span><span class="WHIT">	    </span><span class="NAME">this.asn1KID</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DEROctetString</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1840</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">param</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"object"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>1841</span> </span><span class="WHIT">		    </span><span class="NAME">KJUR.crypto.Util.isKey</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>1842</span> </span><span class="WHIT">		   </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">param</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>1843</span> </span><span class="WHIT">		    </span><span class="NAME">param.indexOf</span><span class="PUNC">(</span><span class="STRN">"BEGIN "</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1844</span> 
<span class='line'>1845</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">keyobj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">param</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1846</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">param</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1847</span> </span><span class="WHIT">		</span><span class="NAME">keyobj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KEYUTIL.getKey</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1848</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1849</span> 
<span class='line'>1850</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">kid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KEYUTIL.getKeyID</span><span class="PUNC">(</span><span class="NAME">keyobj</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1851</span> </span><span class="WHIT">	    </span><span class="NAME">this.asn1KID</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DEROctetString</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">hex</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">kid</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1852</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1853</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1854</span> 
<span class='line'>1855</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1856</span>      * set authorityCertIssuer value by X500Name parameter
<span class='line'>1857</span>      * @name setCertIssuerByParam
<span class='line'>1858</span>      * @memberOf KJUR.asn1.x509.AuthorityKeyIdentifier#
<span class='line'>1859</span>      * @function
<span class='line'>1860</span>      * @param {Array} param parameter to set issuer name
<span class='line'>1861</span>      * @since asn1x509 1.0.8
<span class='line'>1862</span>      * @description
<span class='line'>1863</span>      * This method will set authorityCertIssuer name by param.
<span class='line'>1864</span>      * Issuer name can be set by following type of param argument:
<span class='line'>1865</span>      * &lt;ul>
<span class='line'>1866</span>      * &lt;li>str/ldapstr/hex/certsubject/certissuer - 
<span class='line'>1867</span>      * set issuer by {@link KJUR.asn1.x509.X500Name}
<span class='line'>1868</span>      * object with specified parameters.&lt;/li>
<span class='line'>1869</span>      * &lt;li>PEM CERTIFICATE STRING - extract its subject name from 
<span class='line'>1870</span>      * specified issuer PEM certificate and set.
<span class='line'>1871</span>      * &lt;/ul>
<span class='line'>1872</span>      * NOTE1: Automatic authorityCertIssuer setting by certificate
<span class='line'>1873</span>      * is supported since jsrsasign 8.0.16.
<span class='line'>1874</span>      *
<span class='line'>1875</span>      * @see KJUR.asn1.x509.X500Name
<span class='line'>1876</span>      * @see KJUR.asn1.x509.GeneralNames
<span class='line'>1877</span>      * @see X509.getSubjectHex
<span class='line'>1878</span>      *
<span class='line'>1879</span>      * @example
<span class='line'>1880</span>      * var o = new KJUR.asn1.x509.AuthorityKeyIdentifier();
<span class='line'>1881</span>      * // 1. set it by string
<span class='line'>1882</span>      * o.setCertIssuerByParam({str: '/C=US/O=Test'});
<span class='line'>1883</span>      * // 2. set it by issuer PEM certificate
<span class='line'>1884</span>      * o.setCertIssuerByParam("-----BEGIN CERTIFICATE...");
<span class='line'>1885</span>      *
<span class='line'>1886</span>      */</span><span class="WHIT">
<span class='line'>1887</span> </span><span class="WHIT">    </span><span class="NAME">this.setCertIssuerByParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1888</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">param.str</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>1889</span> </span><span class="WHIT">	    </span><span class="NAME">param.ldapstr</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>1890</span> </span><span class="WHIT">	    </span><span class="NAME">param.hex</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>1891</span> </span><span class="WHIT">	    </span><span class="NAME">param.certsubject</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>1892</span> </span><span class="WHIT">	    </span><span class="NAME">param.certissuer</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1893</span> </span><span class="WHIT">            </span><span class="NAME">this.asn1CertIssuer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.X500Name</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1894</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">param</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>1895</span> </span><span class="WHIT">		   </span><span class="NAME">param.indexOf</span><span class="PUNC">(</span><span class="STRN">"BEGIN "</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>1896</span> </span><span class="WHIT">		   </span><span class="NAME">param.indexOf</span><span class="PUNC">(</span><span class="STRN">"CERTIFICATE"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1897</span> </span><span class="WHIT">            </span><span class="NAME">this.asn1CertIssuer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.X500Name</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">certissuer</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">param</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1898</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1899</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1900</span> 
<span class='line'>1901</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1902</span>      * set authorityCertSerialNumber value
<span class='line'>1903</span>      * @name setCertSerialNumberByParam
<span class='line'>1904</span>      * @memberOf KJUR.asn1.x509.AuthorityKeyIdentifier#
<span class='line'>1905</span>      * @function
<span class='line'>1906</span>      * @param {Object} param parameter to set serial number
<span class='line'>1907</span>      * @since asn1x509 1.0.8
<span class='line'>1908</span>      * @description
<span class='line'>1909</span>      * This method will set authorityCertSerialNumber by param.
<span class='line'>1910</span>      * Serial number can be set by following type of param argument:
<span class='line'>1911</span>      *
<span class='line'>1912</span>      * &lt;ul>
<span class='line'>1913</span>      * &lt;li>{int: 123} - by integer value&lt;/li>
<span class='line'>1914</span>      * &lt;li>{hex: "01af"} - by hexadecimal integer value&lt;/li>
<span class='line'>1915</span>      * &lt;li>{bigint: new BigInteger(...)} - by hexadecimal integer value&lt;/li>
<span class='line'>1916</span>      * &lt;li>PEM CERTIFICATE STRING - extract serial number from issuer certificate and
<span class='line'>1917</span>      * set serial number.
<span class='line'>1918</span>      * 
<span class='line'>1919</span>      * NOTE1: Automatic authorityCertSerialNumber setting by certificate
<span class='line'>1920</span>      * is supported since jsrsasign 8.0.16.
<span class='line'>1921</span>      *
<span class='line'>1922</span>      * @see X509.getSerialNumberHex
<span class='line'>1923</span>      */</span><span class="WHIT">
<span class='line'>1924</span> </span><span class="WHIT">    </span><span class="NAME">this.setCertSNByParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1925</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">param.str</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>1926</span> </span><span class="WHIT">	    </span><span class="NAME">param.bigint</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>1927</span> </span><span class="WHIT">	    </span><span class="NAME">param.hex</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1928</span> </span><span class="WHIT">            </span><span class="NAME">this.asn1CertSN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DERInteger</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1929</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">param</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>1930</span> </span><span class="WHIT">		   </span><span class="NAME">param.indexOf</span><span class="PUNC">(</span><span class="STRN">"BEGIN "</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>1931</span> </span><span class="WHIT">		   </span><span class="NAME">param.indexOf</span><span class="PUNC">(</span><span class="STRN">"CERTIFICATE"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1932</span> 
<span class='line'>1933</span> </span><span class="WHIT">            </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">X509</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1934</span> </span><span class="WHIT">            </span><span class="NAME">x.readCertPEM</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1935</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">x.getSerialNumberHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1936</span> </span><span class="WHIT">	    </span><span class="NAME">this.asn1CertSN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DERInteger</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">hex</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">sn</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1937</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1938</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1939</span> 
<span class='line'>1940</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"2.5.29.35"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1941</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1942</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.kid</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1943</span> </span><span class="WHIT">            </span><span class="NAME">this.setKIDByParam</span><span class="PUNC">(</span><span class="NAME">params.kid</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1944</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1945</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.issuer</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1946</span> </span><span class="WHIT">            </span><span class="NAME">this.setCertIssuerByParam</span><span class="PUNC">(</span><span class="NAME">params.issuer</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1947</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1948</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.sn</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1949</span> </span><span class="WHIT">            </span><span class="NAME">this.setCertSNByParam</span><span class="PUNC">(</span><span class="NAME">params.sn</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1950</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1951</span> 
<span class='line'>1952</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.issuersn</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>1953</span> </span><span class="WHIT">	    </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params.issuersn</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>1954</span> </span><span class="WHIT">	    </span><span class="NAME">params.issuersn.indexOf</span><span class="PUNC">(</span><span class="STRN">"BEGIN "</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>1955</span> </span><span class="WHIT">	    </span><span class="NAME">params.issuersn.indexOf</span><span class="PUNC">(</span><span class="STRN">"CERTIFICATE"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1956</span> </span><span class="WHIT">	    </span><span class="NAME">this.setCertSNByParam</span><span class="PUNC">(</span><span class="NAME">params.issuersn</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1957</span> </span><span class="WHIT">	    </span><span class="NAME">this.setCertIssuerByParam</span><span class="PUNC">(</span><span class="NAME">params.issuersn</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1958</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1959</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1960</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1961</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.AuthorityKeyIdentifier</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1962</span> 
<span class='line'>1963</span> </span><span class="COMM">/**
<span class='line'>1964</span>  * SubjectKeyIdentifier extension ASN.1 structure class
<span class='line'>1965</span>  * @name KJUR.asn1.x509.SubjectKeyIdentifier
<span class='line'>1966</span>  * @class SubjectKeyIdentifier ASN.1 structure class
<span class='line'>1967</span>  * @param {Array} params associative array of parameters (ex. {kid: {hex: '89ab...'}, critical: true})
<span class='line'>1968</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>1969</span>  * @since asn1x509 1.1.7 jsrsasign 8.0.14
<span class='line'>1970</span>  * @description
<span class='line'>1971</span>  * This class represents ASN.1 structure for 
<span class='line'>1972</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.2">
<span class='line'>1973</span>  * SubjectKeyIdentifier in RFC 5280&lt;/a>.
<span class='line'>1974</span>  * Constructor of this class may have following parameters:
<span class='line'>1975</span>  * &lt;ul>
<span class='line'>1976</span>  * &lt;li>kid - When key object (RSA, KJUR.crypto.ECDSA/DSA) or PEM string of subject public key or certificate is specified, key identifier will be automatically calculated by the method specified in RFC 5280. When a hexadecimal string is specifed, kid will be set explicitly by it.&lt;/li>
<span class='line'>1977</span>  * &lt;li>critical - boolean to specify criticality of this extension
<span class='line'>1978</span>  * however conforming CA must mark this extension as non-critical in RFC 5280.&lt;/li>
<span class='line'>1979</span>  * &lt;/ul>
<span class='line'>1980</span>  * &lt;pre>
<span class='line'>1981</span>  * d-ce-subjectKeyIdentifier OBJECT IDENTIFIER ::=  { id-ce 14 }
<span class='line'>1982</span>  * SubjectKeyIdentifier ::= KeyIdentifier
<span class='line'>1983</span>  * KeyIdentifier ::= OCTET STRING
<span class='line'>1984</span>  * &lt;/pre>
<span class='line'>1985</span>  *
<span class='line'>1986</span>  * @example
<span class='line'>1987</span>  * // set by hexadecimal string
<span class='line'>1988</span>  * e = new KJUR.asn1.x509.SubjectKeyIdentifier({kid: {hex: '89ab'}});
<span class='line'>1989</span>  * // set by PEM public key or certificate string
<span class='line'>1990</span>  * e = new KJUR.asn1.x509.SubjectKeyIdentifier({kid: "-----BEGIN CERTIFICATE..."});
<span class='line'>1991</span>  * // set by public key object
<span class='line'>1992</span>  * pubkey = KEYUTIL.getKey("-----BEGIN CERTIFICATE...");
<span class='line'>1993</span>  * e = new KJUR.asn1.x509.SubjectKeyIdentifier({kid: pubkey});
<span class='line'>1994</span>  */</span><span class="WHIT">
<span class='line'>1995</span> </span><span class="NAME">KJUR.asn1.x509.SubjectKeyIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1996</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.SubjectKeyIdentifier.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1997</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1998</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1999</span> </span><span class="WHIT">	</span><span class="NAME">_DEROctetString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DEROctetString</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2000</span> 
<span class='line'>2001</span> </span><span class="WHIT">    </span><span class="NAME">this.asn1KID</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2002</span> 
<span class='line'>2003</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2004</span> </span><span class="WHIT">        </span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.asn1KID</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2005</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2006</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2007</span> 
<span class='line'>2008</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2009</span>      * set keyIdentifier value by DEROctetString parameter, key object or PEM file
<span class='line'>2010</span>      * @name setKIDByParam
<span class='line'>2011</span>      * @memberOf KJUR.asn1.x509.SubjectKeyIdentifier#
<span class='line'>2012</span>      * @function
<span class='line'>2013</span>      * @param {Array} param array of {@link KJUR.asn1.DERInteger} parameter
<span class='line'>2014</span>      * @since asn1x509 1.1.7 jsrsasign 8.0.14
<span class='line'>2015</span>      * @description
<span class='line'>2016</span>      * &lt;ul>
<span class='line'>2017</span>      * &lt;li>{str: "123"} - by raw string&lt;/li>
<span class='line'>2018</span>      * &lt;li>{hex: "01af..."} - by hexadecimal value&lt;/li>
<span class='line'>2019</span>      * &lt;li>RSAKey/DSA/ECDSA - by RSAKey, KJUR.crypto.{DSA/ECDSA} public key object.
<span class='line'>2020</span>      * key identifier value will be calculated by the method described in
<span class='line'>2021</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.2">RFC 5280 4.2.1.2 (1)&lt;/a>.
<span class='line'>2022</span>      * &lt;/li>
<span class='line'>2023</span>      * &lt;li>certificate PEM string - extract subjectPublicKeyInfo from specified PEM
<span class='line'>2024</span>      * certificate and
<span class='line'>2025</span>      * key identifier value will be calculated by the method described in
<span class='line'>2026</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.2">RFC 5280 4.2.1.2 (1)&lt;/a>.
<span class='line'>2027</span>      * &lt;li>PKCS#1/#8 public key PEM string - pem will be converted to a key object and
<span class='line'>2028</span>      * to PKCS#8 ASN.1 structure then calculate 
<span class='line'>2029</span>      * a key identifier value will be calculated by the method described in
<span class='line'>2030</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.2">RFC 5280 4.2.1.2 (1)&lt;/a>.
<span class='line'>2031</span>      * &lt;/ul>
<span class='line'>2032</span>      *
<span class='line'>2033</span>      * NOTE1: Automatic key identifier calculation is supported
<span class='line'>2034</span>      * since jsrsasign 8.0.16.
<span class='line'>2035</span>      *
<span class='line'>2036</span>      * @see KEYUTIL.getKeyID
<span class='line'>2037</span>      *
<span class='line'>2038</span>      * @example
<span class='line'>2039</span>      * o = new KJUR.asn1.x509.SubjectKeyIdentifier();
<span class='line'>2040</span>      * // set by hexadecimal string
<span class='line'>2041</span>      * o.setKIDByParam({hex: '1ad9...'});
<span class='line'>2042</span>      * // set by SubjectPublicKeyInfo of PEM certificate string
<span class='line'>2043</span>      * o.setKIDByParam("-----BEGIN CERTIFICATE...");
<span class='line'>2044</span>      * // set by PKCS#8 PEM public key string
<span class='line'>2045</span>      * o.setKIDByParam("-----BEGIN PUBLIC KEY...");
<span class='line'>2046</span>      * // set by public key object
<span class='line'>2047</span>      * pubkey = KEYUTIL.getKey("-----BEGIN CERTIFICATE...");
<span class='line'>2048</span>      * o.setKIDByParam(pubkey);
<span class='line'>2049</span>      */</span><span class="WHIT">
<span class='line'>2050</span> </span><span class="WHIT">    </span><span class="NAME">this.setKIDByParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2051</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">param.str</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>2052</span> </span><span class="WHIT">	    </span><span class="NAME">param.hex</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2053</span> </span><span class="WHIT">	    </span><span class="NAME">this.asn1KID</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DEROctetString</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2054</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">param</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"object"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>2055</span> </span><span class="WHIT">		    </span><span class="NAME">KJUR.crypto.Util.isKey</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>2056</span> </span><span class="WHIT">		   </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">param</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>2057</span> </span><span class="WHIT">		    </span><span class="NAME">param.indexOf</span><span class="PUNC">(</span><span class="STRN">"BEGIN"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2058</span> 
<span class='line'>2059</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">keyobj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">param</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2060</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">param</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2061</span> </span><span class="WHIT">		</span><span class="NAME">keyobj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KEYUTIL.getKey</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2062</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2063</span> 
<span class='line'>2064</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">kid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KEYUTIL.getKeyID</span><span class="PUNC">(</span><span class="NAME">keyobj</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2065</span> </span><span class="WHIT">	    </span><span class="NAME">this.asn1KID</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DEROctetString</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">hex</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">kid</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2066</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2067</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2068</span> 
<span class='line'>2069</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"2.5.29.14"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2070</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2071</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.kid</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2072</span> </span><span class="WHIT">	    </span><span class="NAME">this.setKIDByParam</span><span class="PUNC">(</span><span class="NAME">params.kid</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2073</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2074</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2075</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2076</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.SubjectKeyIdentifier</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2077</span> 
<span class='line'>2078</span> </span><span class="COMM">/**
<span class='line'>2079</span>  * AuthorityInfoAccess ASN.1 structure class
<span class='line'>2080</span>  * @name KJUR.asn1.x509.AuthorityInfoAccess
<span class='line'>2081</span>  * @class AuthorityInfoAccess ASN.1 structure class
<span class='line'>2082</span>  * @param {Array} params JSON object of AuthorityInfoAccess parameters
<span class='line'>2083</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>2084</span>  * @since asn1x509 1.0.8
<span class='line'>2085</span>  * @see {@link X509#getExtAuthorityInfoAccess}
<span class='line'>2086</span>  * @description
<span class='line'>2087</span>  * This class represents 
<span class='line'>2088</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.2.1">
<span class='line'>2089</span>  * AuthorityInfoAccess extension defined in RFC 5280 4.2.2.1&lt;/a>.
<span class='line'>2090</span>  * &lt;pre>
<span class='line'>2091</span>  * id-pe OBJECT IDENTIFIER  ::=  { id-pkix 1 }
<span class='line'>2092</span>  * id-pe-authorityInfoAccess OBJECT IDENTIFIER ::= { id-pe 1 }
<span class='line'>2093</span>  * AuthorityInfoAccessSyntax  ::=
<span class='line'>2094</span>  *         SEQUENCE SIZE (1..MAX) OF AccessDescription
<span class='line'>2095</span>  * AccessDescription  ::=  SEQUENCE {
<span class='line'>2096</span>  *         accessMethod          OBJECT IDENTIFIER,
<span class='line'>2097</span>  *         accessLocation        GeneralName  }
<span class='line'>2098</span>  * id-ad OBJECT IDENTIFIER ::= { id-pkix 48 }
<span class='line'>2099</span>  * id-ad-caIssuers OBJECT IDENTIFIER ::= { id-ad 2 }
<span class='line'>2100</span>  * id-ad-ocsp OBJECT IDENTIFIER ::= { id-ad 1 }
<span class='line'>2101</span>  * &lt;/pre>
<span class='line'>2102</span>  * NOTE: Acceptable parameters have been changed since
<span class='line'>2103</span>  * from jsrsasign 9.0.0 asn1x509 2.0.0.
<span class='line'>2104</span>  * Parameter generated by {@link X509#getAuthorityInfoAccess}
<span class='line'>2105</span>  * can be accepted as a argument of this constructor.
<span class='line'>2106</span>  * @example
<span class='line'>2107</span>  * e1 = new KJUR.asn1.x509.AuthorityInfoAccess({
<span class='line'>2108</span>  *   array: [
<span class='line'>2109</span>  *     {ocsp: 'http://ocsp.example.org'},
<span class='line'>2110</span>  *     {caissuer: 'https://repository.example.org/aaa.crt'}
<span class='line'>2111</span>  *   ]
<span class='line'>2112</span>  * });
<span class='line'>2113</span>  */</span><span class="WHIT">
<span class='line'>2114</span> </span><span class="NAME">KJUR.asn1.x509.AuthorityInfoAccess</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2115</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.AuthorityInfoAccess.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2116</span> 
<span class='line'>2117</span> </span><span class="WHIT">    </span><span class="NAME">this.setAccessDescriptionArray</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aParam</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2118</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aASN1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Array</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2119</span> </span><span class="WHIT">	    </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2120</span> </span><span class="WHIT">	    </span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2121</span> </span><span class="WHIT">	    </span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2122</span> </span><span class="WHIT">	    </span><span class="NAME">_DERObjectIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERObjectIdentifier</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2123</span> </span><span class="WHIT">	    </span><span class="NAME">_GeneralName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509.GeneralName</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2124</span> 
<span class='line'>2125</span> </span><span class="WHIT">        </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aParam.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2126</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">adseq</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2127</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">adparam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aParam</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2128</span> 
<span class='line'>2129</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">adparam.ocsp</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2130</span> </span><span class="WHIT">		</span><span class="NAME">adseq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT">
<span class='line'>2131</span> </span><span class="WHIT">		    </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERObjectIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">oid</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"1.3.6.1.5.5.7.48.1"</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2132</span> </span><span class="WHIT">		    </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_GeneralName</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">uri</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">adparam.ocsp</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2133</span> </span><span class="WHIT">		</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2134</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">adparam.caissuer</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2135</span> </span><span class="WHIT">		</span><span class="NAME">adseq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT">
<span class='line'>2136</span> </span><span class="WHIT">		    </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERObjectIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">oid</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"1.3.6.1.5.5.7.48.2"</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2137</span> </span><span class="WHIT">		    </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_GeneralName</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">uri</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">adparam.caissuer</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2138</span> </span><span class="WHIT">		</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2139</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2140</span> </span><span class="WHIT">		</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"unknown AccessMethod parameter: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>2141</span> </span><span class="WHIT">				</span><span class="NAME">JSON.stringify</span><span class="PUNC">(</span><span class="NAME">adparam</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2142</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2143</span> </span><span class="WHIT">	    </span><span class="NAME">aASN1.push</span><span class="PUNC">(</span><span class="NAME">adseq</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2144</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2145</span> </span><span class="WHIT">        </span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'array'</span><span class="PUNC">:</span><span class="NAME">aASN1</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2146</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2147</span> 
<span class='line'>2148</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2149</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2150</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2151</span> 
<span class='line'>2152</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"1.3.6.1.5.5.7.1.1"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2153</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2154</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.array</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2155</span> </span><span class="WHIT">            </span><span class="NAME">this.setAccessDescriptionArray</span><span class="PUNC">(</span><span class="NAME">params.array</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2156</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2157</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2158</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2159</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.AuthorityInfoAccess</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2160</span> 
<span class='line'>2161</span> </span><span class="COMM">/**
<span class='line'>2162</span>  * SubjectAltName ASN.1 structure class&lt;br/>
<span class='line'>2163</span>  * @name KJUR.asn1.x509.SubjectAltName
<span class='line'>2164</span>  * @class SubjectAltName ASN.1 structure class
<span class='line'>2165</span>  * @param {Array} params associative array of parameters
<span class='line'>2166</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>2167</span>  * @since jsrsasign 6.2.3 asn1x509 1.0.19
<span class='line'>2168</span>  * @see KJUR.asn1.x509.GeneralNames
<span class='line'>2169</span>  * @see KJUR.asn1.x509.GeneralName
<span class='line'>2170</span>  * @description
<span class='line'>2171</span>  * This class provides X.509v3 SubjectAltName extension.
<span class='line'>2172</span>  * &lt;pre>
<span class='line'>2173</span>  * id-ce-subjectAltName OBJECT IDENTIFIER ::=  { id-ce 17 }
<span class='line'>2174</span>  * SubjectAltName ::= GeneralNames
<span class='line'>2175</span>  * GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
<span class='line'>2176</span>  * GeneralName ::= CHOICE {
<span class='line'>2177</span>  *   otherName                  [0] OtherName,
<span class='line'>2178</span>  *   rfc822Name                 [1] IA5String,
<span class='line'>2179</span>  *   dNSName                    [2] IA5String,
<span class='line'>2180</span>  *   x400Address                [3] ORAddress,
<span class='line'>2181</span>  *   directoryName              [4] Name,
<span class='line'>2182</span>  *   ediPartyName               [5] EDIPartyName,
<span class='line'>2183</span>  *   uniformResourceIdentifier  [6] IA5String,
<span class='line'>2184</span>  *   iPAddress                  [7] OCTET STRING,
<span class='line'>2185</span>  *   registeredID               [8] OBJECT IDENTIFIER }
<span class='line'>2186</span>  * &lt;/pre>
<span class='line'>2187</span>  * @example
<span class='line'>2188</span>  * e1 = new KJUR.asn1.x509.SubjectAltName({
<span class='line'>2189</span>  *   critical: true,
<span class='line'>2190</span>  *   array: [{uri: 'http://aaa.com/'}, {uri: 'http://bbb.com/'}]
<span class='line'>2191</span>  * });
<span class='line'>2192</span>  */</span><span class="WHIT">
<span class='line'>2193</span> </span><span class="NAME">KJUR.asn1.x509.SubjectAltName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2194</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.SubjectAltName.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2195</span> 
<span class='line'>2196</span> </span><span class="WHIT">    </span><span class="NAME">this.setNameArray</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">paramsArray</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2197</span> </span><span class="WHIT">	</span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.GeneralNames</span><span class="PUNC">(</span><span class="NAME">paramsArray</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2198</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2199</span> 
<span class='line'>2200</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2201</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2202</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2203</span> 
<span class='line'>2204</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"2.5.29.17"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2205</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2206</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.array</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2207</span> </span><span class="WHIT">            </span><span class="NAME">this.setNameArray</span><span class="PUNC">(</span><span class="NAME">params.array</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2208</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2209</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2210</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2211</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.SubjectAltName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2212</span> 
<span class='line'>2213</span> </span><span class="COMM">/**
<span class='line'>2214</span>  * IssuerAltName ASN.1 structure class&lt;br/>
<span class='line'>2215</span>  * @name KJUR.asn1.x509.IssuerAltName
<span class='line'>2216</span>  * @class IssuerAltName ASN.1 structure class
<span class='line'>2217</span>  * @param {Array} params associative array of parameters
<span class='line'>2218</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>2219</span>  * @since jsrsasign 6.2.3 asn1x509 1.0.19
<span class='line'>2220</span>  * @see KJUR.asn1.x509.GeneralNames
<span class='line'>2221</span>  * @see KJUR.asn1.x509.GeneralName
<span class='line'>2222</span>  * @description
<span class='line'>2223</span>  * This class provides X.509v3 IssuerAltName extension.
<span class='line'>2224</span>  * &lt;pre>
<span class='line'>2225</span>  * id-ce-subjectAltName OBJECT IDENTIFIER ::=  { id-ce 18 }
<span class='line'>2226</span>  * IssuerAltName ::= GeneralNames
<span class='line'>2227</span>  * GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
<span class='line'>2228</span>  * GeneralName ::= CHOICE {
<span class='line'>2229</span>  *   otherName                  [0] OtherName,
<span class='line'>2230</span>  *   rfc822Name                 [1] IA5String,
<span class='line'>2231</span>  *   dNSName                    [2] IA5String,
<span class='line'>2232</span>  *   x400Address                [3] ORAddress,
<span class='line'>2233</span>  *   directoryName              [4] Name,
<span class='line'>2234</span>  *   ediPartyName               [5] EDIPartyName,
<span class='line'>2235</span>  *   uniformResourceIdentifier  [6] IA5String,
<span class='line'>2236</span>  *   iPAddress                  [7] OCTET STRING,
<span class='line'>2237</span>  *   registeredID               [8] OBJECT IDENTIFIER }
<span class='line'>2238</span>  * &lt;/pre>
<span class='line'>2239</span>  * @example
<span class='line'>2240</span>  * e1 = new KJUR.asn1.x509.IssuerAltName({
<span class='line'>2241</span>  *   critical: true,
<span class='line'>2242</span>  *   array: [{uri: 'http://aaa.com/'}, {uri: 'http://bbb.com/'}]
<span class='line'>2243</span>  * });
<span class='line'>2244</span>  */</span><span class="WHIT">
<span class='line'>2245</span> </span><span class="NAME">KJUR.asn1.x509.IssuerAltName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2246</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.IssuerAltName.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2247</span> 
<span class='line'>2248</span> </span><span class="WHIT">    </span><span class="NAME">this.setNameArray</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">paramsArray</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2249</span> </span><span class="WHIT">	</span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.GeneralNames</span><span class="PUNC">(</span><span class="NAME">paramsArray</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2250</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2251</span> 
<span class='line'>2252</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2253</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2254</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2255</span> 
<span class='line'>2256</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"2.5.29.18"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2257</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2258</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.array</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2259</span> </span><span class="WHIT">            </span><span class="NAME">this.setNameArray</span><span class="PUNC">(</span><span class="NAME">params.array</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2260</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2261</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2262</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2263</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.IssuerAltName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2264</span> 
<span class='line'>2265</span> </span><span class="COMM">/**
<span class='line'>2266</span>  * SubjectDirectoryAttributes ASN.1 structure class&lt;br/>
<span class='line'>2267</span>  * @name KJUR.asn1.x509.SubjectDirectoryAttributes
<span class='line'>2268</span>  * @class SubjectDirectoryAttributes ASN.1 structure class
<span class='line'>2269</span>  * @param {Array} params associative array of parameters
<span class='line'>2270</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>2271</span>  * @since jsrsasign 10.1.9 asn1x509 2.1.7
<span class='line'>2272</span>  * @see
<span class='line'>2273</span>  * 
<span class='line'>2274</span>  * @description
<span class='line'>2275</span>  * This class provides X.509v3 SubjectDirectoryAttributes extension
<span class='line'>2276</span>  * defined in &lt;a href="https://tools.ietf.org/html/rfc3739#section-3.3.2">
<span class='line'>2277</span>  * RFC 3739 Qualified Certificate Profile section 3.3.2&lt;/a>.
<span class='line'>2278</span>  * &lt;pre>
<span class='line'>2279</span>  * SubjectDirectoryAttributes ::= Attributes
<span class='line'>2280</span>  * Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
<span class='line'>2281</span>  * Attribute ::= SEQUENCE {
<span class='line'>2282</span>  *   type AttributeType 
<span class='line'>2283</span>  *   values SET OF AttributeValue }
<span class='line'>2284</span>  * AttributeType ::= OBJECT IDENTIFIER
<span class='line'>2285</span>  * AttributeValue ::= ANY DEFINED BY AttributeType
<span class='line'>2286</span>  * &lt;/pre>
<span class='line'>2287</span>  * Value of member "array" is an array which as following associative arrays as elements:
<span class='line'>2288</span>  * &lt;ul>
<span class='line'>2289</span>  * &lt;li>attr: OID name or value of attribute type (ex. "gender" or "1.2.3.4")&lt;/li>
<span class='line'>2290</span>  * &lt;li>str: attribute value of pre defined types (See example for registered attribute types)&lt;/li>
<span class='line'>2291</span>  * &lt;li>array: array of ASN.1 parameters as attribute value (See {@link KJUR.asn1.ASN1Util#newObject})&lt;/li>
<span class='line'>2292</span>  * &lt;/ul>
<span class='line'>2293</span>  * &lt;br/>
<span class='line'>2294</span>  * NOTE: From jsrsasign 10.8.4, member "array in array" supported for an arbitrary
<span class='line'>2295</span>  * attribute value.
<span class='line'>2296</span>  *
<span class='line'>2297</span>  * @example
<span class='line'>2298</span>  * e1 = new KJUR.asn1.x509.SubjectDirectoryAttributes({
<span class='line'>2299</span>  *   extname: "subjectDirectoryAttributes",
<span class='line'>2300</span>  *   array: [
<span class='line'>2301</span>  *     { attr: "dateOfBirth", str: "19701231230000Z" },
<span class='line'>2302</span>  *     { attr: "placeOfBirth", str: "Tokyo" },
<span class='line'>2303</span>  *     { attr: "gender", str: "F" },
<span class='line'>2304</span>  *     { attr: "countryOfCitizenship", str: "JP" },
<span class='line'>2305</span>  *     { attr: "countryOfResidence", str: "JP" },
<span class='line'>2306</span>  *     { attr: "1.2.3.4.5", array: [{prnstr: {str: "aaa"}}] }
<span class='line'>2307</span>  *   ]
<span class='line'>2308</span>  * });
<span class='line'>2309</span>  */</span><span class="WHIT">
<span class='line'>2310</span> </span><span class="NAME">KJUR.asn1.x509.SubjectDirectoryAttributes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2311</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.SubjectDirectoryAttributes.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2312</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2313</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2314</span> </span><span class="WHIT">	</span><span class="NAME">_newObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.ASN1Util.newObject</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2315</span> </span><span class="WHIT">	</span><span class="NAME">_name2oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509.OID.name2oid</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2316</span> 
<span class='line'>2317</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2318</span> 
<span class='line'>2319</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2320</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2321</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">this.params.array.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2322</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pAttr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params.array</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2323</span> 
<span class='line'>2324</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pAttr.attr</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">pAttr.array</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2325</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">"seq"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">{</span><span class="STRN">"oid"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">pAttr.attr</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">"set"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">pAttr.array</span><span class="PUNC">}</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2326</span> </span><span class="WHIT">		</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">_newObject</span><span class="PUNC">(</span><span class="NAME">pObj</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2327</span> </span><span class="WHIT">		</span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2328</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2329</span> 
<span class='line'>2330</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">newparam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">"seq"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">{</span><span class="STRN">"oid"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"1.2.3.4"</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">"set"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">{</span><span class="STRN">"utf8str"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"DE"</span><span class="PUNC">}</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2331</span> 
<span class='line'>2332</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pAttr.attr</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"dateOfBirth"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2333</span> </span><span class="WHIT">		</span><span class="NAME">newparam.seq</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_name2oid</span><span class="PUNC">(</span><span class="NAME">pAttr.attr</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2334</span> </span><span class="WHIT">		</span><span class="NAME">newparam.seq</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">set</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">"gentime"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">pAttr.str</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2335</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pAttr.attr</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"placeOfBirth"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2336</span> </span><span class="WHIT">		</span><span class="NAME">newparam.seq</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_name2oid</span><span class="PUNC">(</span><span class="NAME">pAttr.attr</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2337</span> </span><span class="WHIT">		</span><span class="NAME">newparam.seq</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">set</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">"utf8str"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">pAttr.str</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2338</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pAttr.attr</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"gender"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2339</span> </span><span class="WHIT">		</span><span class="NAME">newparam.seq</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_name2oid</span><span class="PUNC">(</span><span class="NAME">pAttr.attr</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2340</span> </span><span class="WHIT">		</span><span class="NAME">newparam.seq</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">set</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">"prnstr"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">pAttr.str</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2341</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pAttr.attr</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"countryOfCitizenship"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2342</span> </span><span class="WHIT">		</span><span class="NAME">newparam.seq</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_name2oid</span><span class="PUNC">(</span><span class="NAME">pAttr.attr</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2343</span> </span><span class="WHIT">		</span><span class="NAME">newparam.seq</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">set</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">"prnstr"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">pAttr.str</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2344</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pAttr.attr</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"countryOfResidence"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2345</span> </span><span class="WHIT">		</span><span class="NAME">newparam.seq</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_name2oid</span><span class="PUNC">(</span><span class="NAME">pAttr.attr</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2346</span> </span><span class="WHIT">		</span><span class="NAME">newparam.seq</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">set</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">"prnstr"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">pAttr.str</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2347</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2348</span> </span><span class="WHIT">		</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"unsupported attribute: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">pAttr.attr</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2349</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2350</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_newObject</span><span class="PUNC">(</span><span class="NAME">newparam</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2351</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2352</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2353</span> </span><span class="WHIT">	</span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2354</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2355</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2356</span> 
<span class='line'>2357</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"2.5.29.9"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2358</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2359</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2360</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2361</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2362</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.SubjectDirectoryAttributes</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2363</span> 
<span class='line'>2364</span> 
<span class='line'>2365</span> </span><span class="COMM">/**
<span class='line'>2366</span>  * priavte extension ASN.1 structure class&lt;br/>
<span class='line'>2367</span>  * @name KJUR.asn1.x509.PrivateExtension
<span class='line'>2368</span>  * @class private extension ASN.1 structure class
<span class='line'>2369</span>  * @param {Array} params JSON object of private extension
<span class='line'>2370</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>2371</span>  * @since jsrsasign 9.1.1 asn1x509 
<span class='line'>2372</span>  * @see KJUR.asn1.ASN1Util.newObject
<span class='line'>2373</span>  *
<span class='line'>2374</span>  * @description
<span class='line'>2375</span>  * This class is to represent private extension or 
<span class='line'>2376</span>  * unsupported extension. 
<span class='line'>2377</span>  * &lt;pre>
<span class='line'>2378</span>  * Extension  ::=  SEQUENCE  {
<span class='line'>2379</span>  *      extnID      OBJECT IDENTIFIER,
<span class='line'>2380</span>  *      critical    BOOLEAN DEFAULT FALSE,
<span class='line'>2381</span>  *      extnValue   OCTET STRING }
<span class='line'>2382</span>  * &lt;/pre>
<span class='line'>2383</span>  * Following properties can be set for JSON parameter:
<span class='line'>2384</span>  * &lt;ul>
<span class='line'>2385</span>  * &lt;li>{String}extname - string of OID or predefined extension name&lt;/li>
<span class='line'>2386</span>  * &lt;li>{Boolean}critical - critical flag&lt;/li>
<span class='line'>2387</span>  * &lt;li>{Object}extn - hexadecimal string or 
<span class='line'>2388</span>  * of {@link KJUR.asn1.ASN1Util.newObject} 
<span class='line'>2389</span>  * JSON parameter for extnValue field&lt;/li>
<span class='line'>2390</span>  * &lt;/li>
<span class='line'>2391</span>  * &lt;/ul>
<span class='line'>2392</span>  *
<span class='line'>2393</span>  * @example
<span class='line'>2394</span>  * // extn by hexadecimal
<span class='line'>2395</span>  * new KJUR.asn1.x509.PrivateExtension({
<span class='line'>2396</span>  *   extname: "1.2.3.4",
<span class='line'>2397</span>  *   critical: true,
<span class='line'>2398</span>  *   extn: "13026161" // means PrintableString "aa"
<span class='line'>2399</span>  * });
<span class='line'>2400</span>  *
<span class='line'>2401</span>  * // extn by JSON parameter
<span class='line'>2402</span>  * new KJUR.asn1.x509.PrivateExtension({
<span class='line'>2403</span>  *   extname: "1.2.3.5",
<span class='line'>2404</span>  *   extn: {seq: [{prnstr:"abc"},{utf8str:"def"}]}
<span class='line'>2405</span>  * });
<span class='line'>2406</span>  */</span><span class="WHIT">
<span class='line'>2407</span> </span><span class="NAME">KJUR.asn1.x509.PrivateExtension</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2408</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.PrivateExtension.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2409</span> 
<span class='line'>2410</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2411</span> </span><span class="WHIT">	</span><span class="NAME">_isHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.lang.String.isHex</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2412</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2413</span> </span><span class="WHIT">	</span><span class="NAME">_name2oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509.OID.name2oid</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2414</span> </span><span class="WHIT">	</span><span class="NAME">_newObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.ASN1Util.newObject</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2415</span> 
<span class='line'>2416</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2417</span> 
<span class='line'>2418</span> </span><span class="WHIT">    </span><span class="NAME">this.setByParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2419</span> </span><span class="WHIT">	</span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_name2oid</span><span class="PUNC">(</span><span class="NAME">params.extname</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2420</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2421</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2422</span> 
<span class='line'>2423</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2424</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.params.extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>2425</span> </span><span class="WHIT">	    </span><span class="NAME">this.params.extn</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2426</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"extname or extnhex not specified"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2427</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2428</span> 
<span class='line'>2429</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">extn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params.extn</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2430</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">extn</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">_isHex</span><span class="PUNC">(</span><span class="NAME">extn</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2431</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">extn</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2432</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">extn</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"object"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2433</span> </span><span class="WHIT">	    </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2434</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_newObject</span><span class="PUNC">(</span><span class="NAME">extn</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2435</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2436</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2437</span> </span><span class="WHIT">	</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"unsupported extn value"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2438</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2439</span> 
<span class='line'>2440</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2441</span> </span><span class="WHIT">	</span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2442</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2443</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2444</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.PrivateExtension</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2445</span> 
<span class='line'>2446</span> </span><span class="COMM">// === END   X.509v3 Extensions Related =======================================</span><span class="WHIT">
<span class='line'>2447</span> 
<span class='line'>2448</span> </span><span class="COMM">// === BEGIN CRL Related ===================================================</span><span class="WHIT">
<span class='line'>2449</span> </span><span class="COMM">/**
<span class='line'>2450</span>  * X.509 CRL class to sign and generate hex encoded CRL&lt;br/>
<span class='line'>2451</span>  * @name KJUR.asn1.x509.CRL
<span class='line'>2452</span>  * @class X.509 CRL class to sign and generate hex encoded certificate
<span class='line'>2453</span>  * @property {Array} params JSON object of parameters
<span class='line'>2454</span>  * @param {Array} params JSON object of CRL parameters
<span class='line'>2455</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>2456</span>  * @since 1.0.3
<span class='line'>2457</span>  * @see KJUR.asn1.x509.TBSCertList
<span class='line'>2458</span>  * 
<span class='line'>2459</span>  * @description
<span class='line'>2460</span>  * This class represents CertificateList ASN.1 structur of X.509 CRL
<span class='line'>2461</span>  * defined in &lt;a href="https://tools.ietf.org/html/rfc5280#section-5.1">
<span class='line'>2462</span>  * RFC 5280 5.1&lt;/a>
<span class='line'>2463</span>  * &lt;pre>
<span class='line'>2464</span>  * CertificateList  ::=  SEQUENCE  {
<span class='line'>2465</span>  *     tbsCertList          TBSCertList,
<span class='line'>2466</span>  *     signatureAlgorithm   AlgorithmIdentifier,
<span class='line'>2467</span>  *     signatureValue       BIT STRING  }
<span class='line'>2468</span>  * &lt;/pre>
<span class='line'>2469</span>  * NOTE: CRL class is updated without backward 
<span class='line'>2470</span>  * compatibility from jsrsasign 9.1.0 asn1x509 2.1.0.
<span class='line'>2471</span>  * Most of methods are removed and parameters can be set
<span class='line'>2472</span>  * by JSON object.
<span class='line'>2473</span>  * &lt;br/>
<span class='line'>2474</span>  * Constructor of this class can accept all
<span class='line'>2475</span>  * parameters of {@link KJUR.asn1.x509.TBSCertList}.
<span class='line'>2476</span>  * It also accept following parameters additionally:
<span class='line'>2477</span>  * &lt;ul>
<span class='line'>2478</span>  * &lt;li>{TBSCertList}tbsobj (OPTION) - 
<span class='line'>2479</span>  * specifies {@link KJUR.asn1.x509.TBSCertList} 
<span class='line'>2480</span>  * object to be signed if needed. 
<span class='line'>2481</span>  * When this isn't specified, 
<span class='line'>2482</span>  * this will be set from other parametes of TBSCertList.&lt;/li>
<span class='line'>2483</span>  * &lt;li>{Object}cakey (OPTION) - specifies CRL signing private key.
<span class='line'>2484</span>  * Parameter "cakey" or "sighex" shall be specified. Following
<span class='line'>2485</span>  * values can be specified:
<span class='line'>2486</span>  *   &lt;ul>
<span class='line'>2487</span>  *   &lt;li>PKCS#1/5 or PKCS#8 PEM string of private key&lt;/li>
<span class='line'>2488</span>  *   &lt;li>RSAKey/DSA/ECDSA key object. {@link KEYUTIL.getKey} is useful
<span class='line'>2489</span>  *   to generate a key object.&lt;/li>
<span class='line'>2490</span>  *   &lt;/ul>
<span class='line'>2491</span>  * &lt;/li>
<span class='line'>2492</span>  * &lt;li>{String}sighex (OPTION) - hexadecimal string of signature value
<span class='line'>2493</span>  * (i.e. ASN.1 value(V) of signatureValue BIT STRING without
<span class='line'>2494</span>  * unused bits)&lt;/li>
<span class='line'>2495</span>  * &lt;/ul>
<span class='line'>2496</span>  *
<span class='line'>2497</span>  * @example
<span class='line'>2498</span>  * var crl = new KJUR.asn1.x509.CRL({
<span class='line'>2499</span>  *  sigalg: "SHA256withRSA",
<span class='line'>2500</span>  *  issuer: {str:'/C=JP/O=Test1'},
<span class='line'>2501</span>  *  thisupdate: "200821235959Z",
<span class='line'>2502</span>  *  nextupdate: "200828235959Z", // OPTION
<span class='line'>2503</span>  *  revcert: [{sn: {hex: "12ab"}, date: "200401235959Z"}],
<span class='line'>2504</span>  *  ext: [
<span class='line'>2505</span>  *   {extname: "cRLNumber", num: {'int': 8}},
<span class='line'>2506</span>  *   {extname: "authorityKeyIdentifier", "kid": {hex: "12ab"}}
<span class='line'>2507</span>  *  ],
<span class='line'>2508</span>  *  cakey: prvkey
<span class='line'>2509</span>  * });
<span class='line'>2510</span>  * crl.gettohex() &rarr; "30..."
<span class='line'>2511</span>  * crl.getPEM() &rarr; "-----BEGIN X509 CRL..."
<span class='line'>2512</span>  */</span><span class="WHIT">
<span class='line'>2513</span> </span><span class="NAME">KJUR.asn1.x509.CRL</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2514</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.CRL.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2515</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2516</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2517</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2518</span> </span><span class="WHIT">	</span><span class="NAME">_DERBitString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERBitString</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2519</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2520</span> </span><span class="WHIT">	</span><span class="NAME">_AlgorithmIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.AlgorithmIdentifier</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2521</span> </span><span class="WHIT">	</span><span class="NAME">_TBSCertList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.TBSCertList</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2522</span> 
<span class='line'>2523</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2524</span> 
<span class='line'>2525</span> </span><span class="WHIT">    </span><span class="NAME">this.setByParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2526</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2527</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2528</span> 
<span class='line'>2529</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2530</span>      * sign CRL&lt;br/>
<span class='line'>2531</span>      * @name sign
<span class='line'>2532</span>      * @memberOf KJUR.asn1.x509.CRL#
<span class='line'>2533</span>      * @function
<span class='line'>2534</span>      * @description
<span class='line'>2535</span>      * This method signs TBSCertList with a specified 
<span class='line'>2536</span>      * private key and algorithm by 
<span class='line'>2537</span>      * this.params.cakey and this.params.sigalg parameter.
<span class='line'>2538</span>      * @example
<span class='line'>2539</span>      * crl = new KJUR.asn1.x509.CRL({..., cakey:prvkey});
<span class='line'>2540</span>      * crl.sign()
<span class='line'>2541</span>      */</span><span class="WHIT">
<span class='line'>2542</span> </span><span class="WHIT">    </span><span class="NAME">this.sign</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2543</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hTBSCL</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_TBSCertList</span><span class="PUNC">(</span><span class="NAME">this.params</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2544</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sig</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.crypto.Signature</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">alg</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.params.sigalg</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2545</span> </span><span class="WHIT">	</span><span class="NAME">sig.init</span><span class="PUNC">(</span><span class="NAME">this.params.cakey</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2546</span> </span><span class="WHIT">	</span><span class="NAME">sig.updateHex</span><span class="PUNC">(</span><span class="NAME">hTBSCL</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2547</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sighex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sig.sign</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2548</span> </span><span class="WHIT">	</span><span class="NAME">this.params.sighex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sighex</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2549</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2550</span> 
<span class='line'>2551</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2552</span>      * get PEM formatted CRL string after signed&lt;br/>
<span class='line'>2553</span>      * @name getPEM
<span class='line'>2554</span>      * @memberOf KJUR.asn1.x509.CRL#
<span class='line'>2555</span>      * @function
<span class='line'>2556</span>      * @return PEM formatted string of CRL
<span class='line'>2557</span>      * @since jsrsasign 9.1.0 asn1hex 2.1.0
<span class='line'>2558</span>      * @description
<span class='line'>2559</span>      * This method returns a string of PEM formatted 
<span class='line'>2560</span>      * CRL.
<span class='line'>2561</span>      * @example
<span class='line'>2562</span>      * crl = new KJUR.asn1.x509.CRL({...});
<span class='line'>2563</span>      * crl.getPEM() &rarr;
<span class='line'>2564</span>      * "-----BEGIN X509 CRL-----\r\n..."
<span class='line'>2565</span>      */</span><span class="WHIT">
<span class='line'>2566</span> </span><span class="WHIT">    </span><span class="NAME">this.getPEM</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2567</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">hextopem</span><span class="PUNC">(</span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"X509 CRL"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2568</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2569</span> 
<span class='line'>2570</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2571</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2572</span> 
<span class='line'>2573</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.tbsobj</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2574</span> </span><span class="WHIT">	    </span><span class="NAME">params.tbsobj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_TBSCertList</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2575</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2576</span> 
<span class='line'>2577</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.sighex</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">params.cakey</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2578</span> </span><span class="WHIT">	    </span><span class="NAME">this.sign</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2579</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2580</span> 
<span class='line'>2581</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.sighex</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2582</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"sighex or cakey parameter not defined"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2583</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2584</span> </span><span class="WHIT">	
<span class='line'>2585</span> 	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2586</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">params.tbsobj</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2587</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_AlgorithmIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">name</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.sigalg</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2588</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERBitString</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">hex</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"00"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">params.sighex</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2589</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2590</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">seq.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2591</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2592</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2593</span> 
<span class='line'>2594</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2595</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2596</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.CRL</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2597</span> 
<span class='line'>2598</span> </span><span class="COMM">/**
<span class='line'>2599</span>  * ASN.1 TBSCertList ASN.1 structure class for CRL&lt;br/>
<span class='line'>2600</span>  * @name KJUR.asn1.x509.TBSCertList
<span class='line'>2601</span>  * @class TBSCertList ASN.1 structure class for CRL
<span class='line'>2602</span>  * @property {Array} params JSON object of parameters
<span class='line'>2603</span>  * @param {Array} params JSON object of TBSCertList parameters
<span class='line'>2604</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>2605</span>  * @since 1.0.3
<span class='line'>2606</span>  *
<span class='line'>2607</span>  * @description
<span class='line'>2608</span>  * This class represents TBSCertList of CRL defined in
<span class='line'>2609</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-5.1">
<span class='line'>2610</span>  * RFC 5280 5.1&lt;/a>.
<span class='line'>2611</span>  * &lt;pre>
<span class='line'>2612</span>  * TBSCertList  ::=  SEQUENCE  {
<span class='line'>2613</span>  *       version                 Version OPTIONAL,
<span class='line'>2614</span>  *                                    -- if present, MUST be v2
<span class='line'>2615</span>  *       signature               AlgorithmIdentifier,
<span class='line'>2616</span>  *       issuer                  Name,
<span class='line'>2617</span>  *       thisUpdate              Time,
<span class='line'>2618</span>  *       nextUpdate              Time OPTIONAL,
<span class='line'>2619</span>  *       revokedCertificates     SEQUENCE OF SEQUENCE  {
<span class='line'>2620</span>  *            userCertificate         CertificateSerialNumber,
<span class='line'>2621</span>  *            revocationDate          Time,
<span class='line'>2622</span>  *            crlEntryExtensions      Extensions OPTIONAL
<span class='line'>2623</span>  *                                     -- if present, version MUST be v2
<span class='line'>2624</span>  *                                 }  OPTIONAL,
<span class='line'>2625</span>  *       crlExtensions           [0]  EXPLICIT Extensions OPTIONAL
<span class='line'>2626</span>  * }
<span class='line'>2627</span>  * &lt;/pre>
<span class='line'>2628</span>  * NOTE: TBSCertList class is updated without backward 
<span class='line'>2629</span>  * compatibility from jsrsasign 9.1.0 asn1x509 2.1.0.
<span class='line'>2630</span>  * Most of methods are removed and parameters can be set
<span class='line'>2631</span>  * by JSON object.
<span class='line'>2632</span>  * &lt;br/>
<span class='line'>2633</span>  * Constructor of this class may have following parameters:
<span class='line'>2634</span>  * &lt;ul>
<span class='line'>2635</span>  * &lt;li>{Integer}version (OPTION) - version number. Omitted by default.&lt;/li>
<span class='line'>2636</span>  * &lt;li>{String}sigalg - signature algorithm name&lt;/li>
<span class='line'>2637</span>  * &lt;li>{Array}issuer - issuer parameter of {@link KJUR.asn1.x509.X500Name}&lt;/li>
<span class='line'>2638</span>  * &lt;li>{String}thisupdate - thisUpdate field value&lt;/li>
<span class='line'>2639</span>  * &lt;li>{String}nextupdate (OPTION) - thisUpdate field value&lt;/li>
<span class='line'>2640</span>  * &lt;li>{Array}revcert (OPTION) - revokedCertificates field value as array
<span class='line'>2641</span>  *   Its element may have following property:
<span class='line'>2642</span>  *   &lt;ul>
<span class='line'>2643</span>  *   &lt;li>{Array}sn - serialNumber of userCertificate field specified
<span class='line'>2644</span>  *   by {@link KJUR.asn1.DERInteger}&lt;/li>
<span class='line'>2645</span>  *   &lt;li>{String}date - revocationDate field specified by
<span class='line'>2646</span>  *   a string of {@link KJUR.asn1.x509.Time} parameter&lt;/li>
<span class='line'>2647</span>  *   &lt;li>{Array}ext (OPTION) - array of CRL entry extension parameter&lt;/li>
<span class='line'>2648</span>  *   &lt;/ul>
<span class='line'>2649</span>  * &lt;/li>
<span class='line'>2650</span>  * &lt;/ul>
<span class='line'>2651</span>  * 
<span class='line'>2652</span>  * @example
<span class='line'>2653</span>  * var o = new KJUR.asn1.x509.TBSCertList({
<span class='line'>2654</span>  *  sigalg: "SHA256withRSA",
<span class='line'>2655</span>  *  issuer: {array: [[{type:'C',value:'JP',ds:'prn'}],
<span class='line'>2656</span>  *                   [{type:'O',value:'T1',ds:'prn'}]]},
<span class='line'>2657</span>  *  thisupdate: "200821235959Z",
<span class='line'>2658</span>  *  nextupdate: "200828235959Z", // OPTION
<span class='line'>2659</span>  *  revcert: [
<span class='line'>2660</span>  *   {sn: {hex: "12ab"}, date: "200401235959Z", ext: [{extname: "cRLReason", code:1}]},
<span class='line'>2661</span>  *   {sn: {hex: "12bc"}, date: "200405235959Z", ext: [{extname: "cRLReason", code:2}]}
<span class='line'>2662</span>  *  ],
<span class='line'>2663</span>  *  ext: [
<span class='line'>2664</span>  *   {extname: "cRLNumber", num: {'int': 8}},
<span class='line'>2665</span>  *   {extname: "authorityKeyIdentifier", "kid": {hex: "12ab"}}
<span class='line'>2666</span>  *  ]
<span class='line'>2667</span>  * });
<span class='line'>2668</span>  * o.tohex() &rarr; "30..."
<span class='line'>2669</span>  */</span><span class="WHIT">
<span class='line'>2670</span> </span><span class="NAME">KJUR.asn1.x509.TBSCertList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2671</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.TBSCertList.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2672</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT">	</span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2673</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2674</span> </span><span class="WHIT">	</span><span class="NAME">_DERInteger</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERInteger</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2675</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2676</span> </span><span class="WHIT">	</span><span class="NAME">_DERTaggedObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERTaggedObject</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2677</span> </span><span class="WHIT">	</span><span class="NAME">_DERObjectIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERObjectIdentifier</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2678</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2679</span> </span><span class="WHIT">	</span><span class="NAME">_AlgorithmIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.AlgorithmIdentifier</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2680</span> </span><span class="WHIT">	</span><span class="NAME">_Time</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.Time</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2681</span> </span><span class="WHIT">	</span><span class="NAME">_Extensions</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.Extensions</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2682</span> </span><span class="WHIT">	</span><span class="NAME">_X500Name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.X500Name</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2683</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2684</span> 
<span class='line'>2685</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2686</span>      * get array of ASN.1 object for extensions&lt;br/>
<span class='line'>2687</span>      * @name setByParam
<span class='line'>2688</span>      * @memberOf KJUR.asn1.x509.TBSCertList#
<span class='line'>2689</span>      * @function
<span class='line'>2690</span>      * @param {Array} JSON object of TBSCertList parameters
<span class='line'>2691</span>      * @example
<span class='line'>2692</span>      * tbsc = new KJUR.asn1.x509.TBSCertificate();
<span class='line'>2693</span>      * tbsc.setByParam({version:3, serial:{hex:'1234...'},...});
<span class='line'>2694</span>      */</span><span class="WHIT">
<span class='line'>2695</span> </span><span class="WHIT">    </span><span class="NAME">this.setByParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2696</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2697</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2698</span> 
<span class='line'>2699</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2700</span>      * get DERSequence for revokedCertificates&lt;br/>
<span class='line'>2701</span>      * @name getRevCertSequence
<span class='line'>2702</span>      * @memberOf KJUR.asn1.x509.TBSCertList#
<span class='line'>2703</span>      * @function
<span class='line'>2704</span>      * @return {@link KJUR.asn1.DERSequence} of revokedCertificates
<span class='line'>2705</span>      */</span><span class="WHIT">
<span class='line'>2706</span> </span><span class="WHIT">    </span><span class="NAME">this.getRevCertSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2707</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2708</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aRevCert</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params.revcert</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2709</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aRevCert.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2710</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aEntry</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT">
<span class='line'>2711</span> </span><span class="WHIT">		</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERInteger</span><span class="PUNC">(</span><span class="NAME">aRevCert</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">sn</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2712</span> </span><span class="WHIT">		</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Time</span><span class="PUNC">(</span><span class="NAME">aRevCert</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">date</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2713</span> </span><span class="WHIT">	    </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2714</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">aRevCert</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">ext</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2715</span> </span><span class="WHIT">		</span><span class="NAME">aEntry.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Extensions</span><span class="PUNC">(</span><span class="NAME">aRevCert</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">ext</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2716</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2717</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">aEntry</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2718</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2719</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2720</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2721</span> 
<span class='line'>2722</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2723</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2724</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2725</span> 
<span class='line'>2726</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.version</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2727</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">version</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.version</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> 
<span class='line'>2728</span> 	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERInteger</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'int'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">version</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2729</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2730</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2731</span> 
<span class='line'>2732</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_AlgorithmIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">name</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.sigalg</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2733</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_X500Name</span><span class="PUNC">(</span><span class="NAME">params.issuer</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2734</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Time</span><span class="PUNC">(</span><span class="NAME">params.thisupdate</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2735</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.nextupdate</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> 
<span class='line'>2736</span> 	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Time</span><span class="PUNC">(</span><span class="NAME">params.nextupdate</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2737</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.revcert</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2738</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">this.getRevCertSequence</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2739</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2740</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.ext</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2741</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dExt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Extensions</span><span class="PUNC">(</span><span class="NAME">params.ext</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2742</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERTaggedObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">tag</span><span class="PUNC">:</span><span class="STRN">'a0'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2743</span> </span><span class="WHIT">					 </span><span class="NAME">explicit</span><span class="PUNC">:</span><span class="KEYW">true</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2744</span> </span><span class="WHIT">					 </span><span class="NAME">obj</span><span class="PUNC">:</span><span class="NAME">dExt</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2745</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2746</span> 
<span class='line'>2747</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2748</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">seq.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2749</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2750</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2751</span> 
<span class='line'>2752</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2753</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2754</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.TBSCertList</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2755</span> 
<span class='line'>2756</span> </span><span class="COMM">/**
<span class='line'>2757</span>  * ASN.1 CRLEntry structure class for CRL (DEPRECATED)&lt;br/>
<span class='line'>2758</span>  * @name KJUR.asn1.x509.CRLEntry
<span class='line'>2759</span>  * @class ASN.1 CRLEntry structure class for CRL
<span class='line'>2760</span>  * @param {Array} params JSON object for CRL entry parameter
<span class='line'>2761</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>2762</span>  * @since 1.0.3
<span class='line'>2763</span>  * @see KJUR.asn1.x509.TBSCertList
<span class='line'>2764</span>  * @deprecated since jsrsasign 9.1.0 asn1x509 2.1.0
<span class='line'>2765</span>  * @description
<span class='line'>2766</span>  * This class is to represent revokedCertificate in TBSCertList.
<span class='line'>2767</span>  * However this is no more used by TBSCertList since
<span class='line'>2768</span>  * jsrsasign 9.1.0. So this class have been deprecated in 
<span class='line'>2769</span>  * jsrsasign 9.1.0.
<span class='line'>2770</span>  * &lt;pre>
<span class='line'>2771</span>  * revokedCertificates     SEQUENCE OF SEQUENCE  {
<span class='line'>2772</span>  *     userCertificate         CertificateSerialNumber,
<span class='line'>2773</span>  *     revocationDate          Time,
<span class='line'>2774</span>  *     crlEntryExtensions      Extensions OPTIONAL
<span class='line'>2775</span>  *                             -- if present, version MUST be v2 }
<span class='line'>2776</span>  * &lt;/pre>
<span class='line'>2777</span>  * @example
<span class='line'>2778</span>  * var e = new KJUR.asn1.x509.CRLEntry({'time': {'str': '130514235959Z'}, 'sn': {'int': 234}});
<span class='line'>2779</span>  */</span><span class="WHIT">
<span class='line'>2780</span> </span><span class="NAME">KJUR.asn1.x509.CRLEntry</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2781</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.CRLEntry.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2782</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2783</span> </span><span class="WHIT">	</span><span class="NAME">time</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2784</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2785</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2786</span> 
<span class='line'>2787</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2788</span>      * set DERInteger parameter for serial number of revoked certificate
<span class='line'>2789</span>      * @name setCertSerial
<span class='line'>2790</span>      * @memberOf KJUR.asn1.x509.CRLEntry
<span class='line'>2791</span>      * @function
<span class='line'>2792</span>      * @param {Array} intParam DERInteger parameter for certificate serial number
<span class='line'>2793</span>      * @description
<span class='line'>2794</span>      * @example
<span class='line'>2795</span>      * entry.setCertSerial({'int': 3});
<span class='line'>2796</span>      */</span><span class="WHIT">
<span class='line'>2797</span> </span><span class="WHIT">    </span><span class="NAME">this.setCertSerial</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">intParam</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2798</span> </span><span class="WHIT">        </span><span class="NAME">this.sn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERInteger</span><span class="PUNC">(</span><span class="NAME">intParam</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2799</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2800</span> 
<span class='line'>2801</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2802</span>      * set Time parameter for revocation date
<span class='line'>2803</span>      * @name setRevocationDate
<span class='line'>2804</span>      * @memberOf KJUR.asn1.x509.CRLEntry
<span class='line'>2805</span>      * @function
<span class='line'>2806</span>      * @param {Array} timeParam Time parameter for revocation date
<span class='line'>2807</span>      * @description
<span class='line'>2808</span>      * @example
<span class='line'>2809</span>      * entry.setRevocationDate({'str': '130508235959Z'});
<span class='line'>2810</span>      */</span><span class="WHIT">
<span class='line'>2811</span> </span><span class="WHIT">    </span><span class="NAME">this.setRevocationDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeParam</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2812</span> </span><span class="WHIT">        </span><span class="NAME">this.time</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509.Time</span><span class="PUNC">(</span><span class="NAME">timeParam</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2813</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2814</span> 
<span class='line'>2815</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2816</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">"array"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">this.sn</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.time</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2817</span> </span><span class="WHIT">        </span><span class="NAME">this.TLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">o.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2818</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.TLV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2819</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2820</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2821</span> 
<span class='line'>2822</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2823</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.time</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2824</span> </span><span class="WHIT">            </span><span class="NAME">this.setRevocationDate</span><span class="PUNC">(</span><span class="NAME">params.time</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2825</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2826</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.sn</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2827</span> </span><span class="WHIT">            </span><span class="NAME">this.setCertSerial</span><span class="PUNC">(</span><span class="NAME">params.sn</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2828</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2829</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2830</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2831</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.CRLEntry</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2832</span> 
<span class='line'>2833</span> </span><span class="COMM">/**
<span class='line'>2834</span>  * CRLNumber CRL extension ASN.1 structure class&lt;br/>
<span class='line'>2835</span>  * @name KJUR.asn1.x509.CRLNumber
<span class='line'>2836</span>  * @class CRLNumber CRL extension ASN.1 structure class
<span class='line'>2837</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>2838</span>  * @since jsrsasign 9.1.0 asn1x509 2.1.0
<span class='line'>2839</span>  * @see KJUR.asn1.x509.TBSCertList
<span class='line'>2840</span>  * @see KJUR.asn1.x509.Extensions
<span class='line'>2841</span>  * @description
<span class='line'>2842</span>  * This class represents ASN.1 structure for
<span class='line'>2843</span>  * CRLNumber CRL extension defined in
<span class='line'>2844</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-5.2.3">
<span class='line'>2845</span>  * RFC 5280 5.2.3&lt;/a>.
<span class='line'>2846</span>  * &lt;pre>
<span class='line'>2847</span>  * id-ce-cRLNumber OBJECT IDENTIFIER ::= { id-ce 20 }
<span class='line'>2848</span>  * CRLNumber ::= INTEGER (0..MAX)
<span class='line'>2849</span>  * &lt;/pre>
<span class='line'>2850</span>  * Constructor of this class may have following parameters:
<span class='line'>2851</span>  * &lt;ul>
<span class='line'>2852</span>  * &lt;li>{String}extname - name "cRLNumber". It is ignored in this class but
<span class='line'>2853</span>  * required to use with {@link KJUR.asn1.x509.Extensions} class. (OPTION)&lt;/li>
<span class='line'>2854</span>  * &lt;li>{Object}num - CRLNumber value to specify
<span class='line'>2855</span>  * {@link KJUR.asn1.DERInteger} parameter.&lt;/li>
<span class='line'>2856</span>  * &lt;li>{Boolean}critical - critical flag. Generally false and not specified
<span class='line'>2857</span>  * in this class.(OPTION)&lt;/li>
<span class='line'>2858</span>  * &lt;/ul>
<span class='line'>2859</span>  *
<span class='line'>2860</span>  * @example
<span class='line'>2861</span>  * new KJUR.asn1.x509.CRLNumber({extname:'cRLNumber',
<span class='line'>2862</span>  *                               num:{'int':147}})
<span class='line'>2863</span>  */</span><span class="WHIT">
<span class='line'>2864</span> </span><span class="NAME">KJUR.asn1.x509.CRLNumber</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2865</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.CRLNumber.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2866</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2867</span> 
<span class='line'>2868</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2869</span> </span><span class="WHIT">        </span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DERInteger</span><span class="PUNC">(</span><span class="NAME">this.params.num</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2870</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2871</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2872</span> 
<span class='line'>2873</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"2.5.29.20"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2874</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2875</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2876</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.CRLNumber</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2877</span> 
<span class='line'>2878</span> </span><span class="COMM">/**
<span class='line'>2879</span>  * CRLReason CRL entry extension ASN.1 structure class&lt;br/>
<span class='line'>2880</span>  * @name KJUR.asn1.x509.CRLReason
<span class='line'>2881</span>  * @class CRLReason CRL entry extension ASN.1 structure class
<span class='line'>2882</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>2883</span>  * @since jsrsasign 9.1.0 asn1x509 2.1.0
<span class='line'>2884</span>  * @see KJUR.asn1.x509.TBSCertList
<span class='line'>2885</span>  * @see KJUR.asn1.x509.Extensions
<span class='line'>2886</span>  * @description
<span class='line'>2887</span>  * This class represents ASN.1 structure for
<span class='line'>2888</span>  * CRLReason CRL entry extension defined in
<span class='line'>2889</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-5.3.1">
<span class='line'>2890</span>  * RFC 5280 5.3.1&lt;/a>
<span class='line'>2891</span>  * &lt;pre>
<span class='line'>2892</span>  * id-ce-cRLReasons OBJECT IDENTIFIER ::= { id-ce 21 }
<span class='line'>2893</span>  * -- reasonCode ::= { CRLReason }
<span class='line'>2894</span>  * CRLReason ::= ENUMERATED {
<span class='line'>2895</span>  *      unspecified             (0),
<span class='line'>2896</span>  *      keyCompromise           (1),
<span class='line'>2897</span>  *      cACompromise            (2),
<span class='line'>2898</span>  *      affiliationChanged      (3),
<span class='line'>2899</span>  *      superseded              (4),
<span class='line'>2900</span>  *      cessationOfOperation    (5),
<span class='line'>2901</span>  *      certificateHold         (6),
<span class='line'>2902</span>  *      removeFromCRL           (8),
<span class='line'>2903</span>  *      privilegeWithdrawn      (9),
<span class='line'>2904</span>  *      aACompromise           (10) }
<span class='line'>2905</span>  * &lt;/pre>
<span class='line'>2906</span>  * Constructor of this class may have following parameters:
<span class='line'>2907</span>  * &lt;ul>
<span class='line'>2908</span>  * &lt;li>{String}extname - name "cRLReason". It is ignored in this class but
<span class='line'>2909</span>  * required to use with {@link KJUR.asn1.x509.Extensions} class. (OPTION)&lt;/li>
<span class='line'>2910</span>  * &lt;li>{Integer}code - reasonCode value&lt;/li>
<span class='line'>2911</span>  * &lt;li>{Boolean}critical - critical flag. Generally false and not specified
<span class='line'>2912</span>  * in this class.(OPTION)&lt;/li>
<span class='line'>2913</span>  * &lt;/ul>
<span class='line'>2914</span>  *
<span class='line'>2915</span>  * @example
<span class='line'>2916</span>  * new KJUR.asn1.x509.CRLReason({extname:'cRLReason',code:4})
<span class='line'>2917</span>  */</span><span class="WHIT">
<span class='line'>2918</span> </span><span class="NAME">KJUR.asn1.x509.CRLReason</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2919</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.CRLReason.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2920</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2921</span> 
<span class='line'>2922</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2923</span> </span><span class="WHIT">        </span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DEREnumerated</span><span class="PUNC">(</span><span class="NAME">this.params.code</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2924</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2925</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2926</span> 
<span class='line'>2927</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"2.5.29.21"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2928</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2929</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2930</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.CRLReason</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2931</span> 
<span class='line'>2932</span> </span><span class="COMM">// === END   CRL Related ===================================================</span><span class="WHIT">
<span class='line'>2933</span> 
<span class='line'>2934</span> </span><span class="COMM">// === BEGIN OCSP Related ===================================================</span><span class="WHIT">
<span class='line'>2935</span> </span><span class="COMM">/**
<span class='line'>2936</span>  * Nonce OCSP extension ASN.1 structure class&lt;br/>
<span class='line'>2937</span>  * @name KJUR.asn1.x509.OCSPNonce
<span class='line'>2938</span>  * @class Nonce OCSP extension ASN.1 structure class
<span class='line'>2939</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>2940</span>  * @since jsrsasign 9.1.6 asn1x509 2.1.2
<span class='line'>2941</span>  * @param {Array} params JSON object for Nonce extension
<span class='line'>2942</span>  * @see KJUR.asn1.ocsp.ResponseData
<span class='line'>2943</span>  * @see KJUR.asn1.x509.Extensions
<span class='line'>2944</span>  * @see X509#getExtOCSPNonce
<span class='line'>2945</span>  * @description
<span class='line'>2946</span>  * This class represents
<span class='line'>2947</span>  * Nonce OCSP extension value defined in
<span class='line'>2948</span>  * &lt;a href="https://tools.ietf.org/html/rfc6960#section-4.4.1">
<span class='line'>2949</span>  * RFC 6960 4.4.1&lt;/a> as JSON object.
<span class='line'>2950</span>  * &lt;pre>
<span class='line'>2951</span>  * id-pkix-ocsp           OBJECT IDENTIFIER ::= { id-ad-ocsp }
<span class='line'>2952</span>  * id-pkix-ocsp-nonce     OBJECT IDENTIFIER ::= { id-pkix-ocsp 2 }
<span class='line'>2953</span>  * Nonce ::= OCTET STRING
<span class='line'>2954</span>  * &lt;/pre>
<span class='line'>2955</span>  * Constructor of this class may have following parameters:
<span class='line'>2956</span>  * &lt;ul>
<span class='line'>2957</span>  * &lt;li>{String}extname - name "ocspNonce". It is ignored in this class but
<span class='line'>2958</span>  * required to use with {@link KJUR.asn1.x509.Extensions} class. (OPTION)&lt;/li>
<span class='line'>2959</span>  * &lt;li>{String}hex - hexadecimal string of nonce value&lt;/li>
<span class='line'>2960</span>  * &lt;li>{Number}int - integer of nonce value. "hex" or "int" needs to be
<span class='line'>2961</span>  * specified.&lt;/li>
<span class='line'>2962</span>  * &lt;li>{Boolean}critical - critical flag. Generally false and not specified
<span class='line'>2963</span>  * in this class.(OPTION)&lt;/li>
<span class='line'>2964</span>  * &lt;/ul>
<span class='line'>2965</span>  *
<span class='line'>2966</span>  * @example
<span class='line'>2967</span>  * new KJUR.asn1.x509.OCSPNonce({extname:'ocspNonce',
<span class='line'>2968</span>  *                               hex: '12ab...'})
<span class='line'>2969</span>  */</span><span class="WHIT">
<span class='line'>2970</span> </span><span class="NAME">KJUR.asn1.x509.OCSPNonce</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2971</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.OCSPNonce.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2972</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2973</span> 
<span class='line'>2974</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2975</span> </span><span class="WHIT">        </span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DEROctetString</span><span class="PUNC">(</span><span class="NAME">this.params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2976</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2977</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2978</span> 
<span class='line'>2979</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"1.3.6.1.5.5.7.48.1.2"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2980</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2981</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2982</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.OCSPNonce</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2983</span> 
<span class='line'>2984</span> </span><span class="COMM">/**
<span class='line'>2985</span>  * OCSPNoCheck certificate ASN.1 structure class&lt;br/>
<span class='line'>2986</span>  * @name KJUR.asn1.x509.OCSPNoCheck
<span class='line'>2987</span>  * @class OCSPNoCheck extension ASN.1 structure class
<span class='line'>2988</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>2989</span>  * @since jsrsasign 9.1.6 asn1x509 2.1.2
<span class='line'>2990</span>  * @param {Array} params JSON object for OCSPNoCheck extension
<span class='line'>2991</span>  * @see KJUR.asn1.x509.Extensions
<span class='line'>2992</span>  * @see X509#getExtOCSPNoCheck
<span class='line'>2993</span>  * @description
<span class='line'>2994</span>  * This class represents
<span class='line'>2995</span>  * OCSPNoCheck extension value defined in
<span class='line'>2996</span>  * &lt;a href="https://tools.ietf.org/html/rfc6960#section-4.2.2.2.1">
<span class='line'>2997</span>  * RFC 6960 4.2.2.2.1&lt;/a> as JSON object.
<span class='line'>2998</span>  * &lt;pre>
<span class='line'>2999</span>  * id-pkix-ocsp-nocheck OBJECT IDENTIFIER ::= { id-pkix-ocsp 5 }
<span class='line'>3000</span>  * &lt;/pre>
<span class='line'>3001</span>  * Constructor of this class may have following parameters:
<span class='line'>3002</span>  * &lt;ul>
<span class='line'>3003</span>  * &lt;li>{String}extname - name "ocspNoCheck". It is ignored in this class but
<span class='line'>3004</span>  * required to use with {@link KJUR.asn1.x509.Extensions} class. (OPTION)&lt;/li>
<span class='line'>3005</span>  * &lt;li>{Boolean}critical - critical flag. Generally false and not specified
<span class='line'>3006</span>  * in this class.(OPTION)&lt;/li>
<span class='line'>3007</span>  * &lt;/ul>
<span class='line'>3008</span>  *
<span class='line'>3009</span>  * @example
<span class='line'>3010</span>  * new KJUR.asn1.x509.OCSPNonce({extname:'ocspNoCheck'})
<span class='line'>3011</span>  */</span><span class="WHIT">
<span class='line'>3012</span> </span><span class="NAME">KJUR.asn1.x509.OCSPNoCheck</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3013</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.OCSPNoCheck.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3014</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3015</span> 
<span class='line'>3016</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3017</span> </span><span class="WHIT">        </span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DERNull</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3018</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3019</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3020</span> 
<span class='line'>3021</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"1.3.6.1.5.5.7.48.1.5"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3022</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3023</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3024</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.OCSPNoCheck</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3025</span> 
<span class='line'>3026</span> </span><span class="COMM">// === END   OCSP Related ===================================================</span><span class="WHIT">
<span class='line'>3027</span> 
<span class='line'>3028</span> </span><span class="COMM">// === BEGIN Other X.509v3 Extensions========================================</span><span class="WHIT">
<span class='line'>3029</span> 
<span class='line'>3030</span> </span><span class="COMM">/**
<span class='line'>3031</span>  * AdobeTimeStamp X.509v3 extension ASN.1 encoder class&lt;br/>
<span class='line'>3032</span>  * @name KJUR.asn1.x509.AdobeTimeStamp
<span class='line'>3033</span>  * @class AdobeTimeStamp X.509v3 extension ASN.1 encoder class
<span class='line'>3034</span>  * @extends KJUR.asn1.x509.Extension
<span class='line'>3035</span>  * @since jsrsasign 10.0.1 asn1x509 2.1.4
<span class='line'>3036</span>  * @param {Array} params JSON object for AdobeTimeStamp extension parameter
<span class='line'>3037</span>  * @see KJUR.asn1.x509.Extensions
<span class='line'>3038</span>  * @see X509#getExtAdobeTimeStamp
<span class='line'>3039</span>  * @description
<span class='line'>3040</span>  * This class represents
<span class='line'>3041</span>  * AdobeTimeStamp X.509v3 extension value defined in
<span class='line'>3042</span>  * &lt;a href="https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSigDC/oids.html">
<span class='line'>3043</span>  * Adobe site&lt;/a> as JSON object.
<span class='line'>3044</span>  * &lt;pre>
<span class='line'>3045</span>  * adbe- OBJECT IDENTIFIER ::=  { adbe(1.2.840.113583) acrobat(1) security(1) x509Ext(9) 1 }
<span class='line'>3046</span>  *  ::= SEQUENCE {
<span class='line'>3047</span>  *     version INTEGER  { v1(1) }, -- extension version
<span class='line'>3048</span>  *     location GeneralName (In v1 GeneralName can be only uniformResourceIdentifier)
<span class='line'>3049</span>  *     requiresAuth        boolean (default false), OPTIONAL }
<span class='line'>3050</span>  * &lt;/pre>
<span class='line'>3051</span>  * Constructor of this class may have following parameters:
<span class='line'>3052</span>  * &lt;ul>
<span class='line'>3053</span>  * &lt;li>{String}uri - RFC 3161 time stamp service URL&lt;/li>
<span class='line'>3054</span>  * &lt;li>{Boolean}reqauth - authentication required or not&lt;/li>
<span class='line'>3055</span>  * &lt;/ul>
<span class='line'>3056</span>  * &lt;/pre>
<span class='line'>3057</span>  * &lt;br/>
<span class='line'>3058</span>  * NOTE: This extesion doesn't seem to have official name. This may be called as "pdfTimeStamp".
<span class='line'>3059</span>  * @example
<span class='line'>3060</span>  * new KJUR.asn1.x509.AdobeTimesStamp({
<span class='line'>3061</span>  *   uri: "http://tsa.example.com/",
<span class='line'>3062</span>  *   reqauth: true
<span class='line'>3063</span>  * }
<span class='line'>3064</span>  */</span><span class="WHIT">
<span class='line'>3065</span> </span><span class="NAME">KJUR.asn1.x509.AdobeTimeStamp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3066</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.AdobeTimeStamp.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3067</span> 
<span class='line'>3068</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3069</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3070</span> </span><span class="WHIT">	</span><span class="NAME">_DERInteger</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERInteger</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3071</span> </span><span class="WHIT">	</span><span class="NAME">_DERBoolean</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERBoolean</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3072</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3073</span> </span><span class="WHIT">	</span><span class="NAME">_GeneralName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509.GeneralName</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3074</span> 
<span class='line'>3075</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3076</span> 
<span class='line'>3077</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3078</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3079</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERInteger</span><span class="PUNC">(</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3080</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_GeneralName</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">uri</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.uri</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3081</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.reqauth</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3082</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERBoolean</span><span class="PUNC">(</span><span class="NAME">params.reqauth</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3083</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3084</span> 
<span class='line'>3085</span> </span><span class="WHIT">        </span><span class="NAME">this.asn1ExtnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3086</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.asn1ExtnValue.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3087</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3088</span> 
<span class='line'>3089</span> </span><span class="WHIT">    </span><span class="NAME">this.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"1.2.840.113583.1.1.9.1"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3090</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3091</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3092</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.AdobeTimeStamp</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.Extension</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3093</span> </span><span class="WHIT"> 
<span class='line'>3094</span> </span><span class="COMM">// === END   Other X.509v3 Extensions========================================</span><span class="WHIT">
<span class='line'>3095</span> 
<span class='line'>3096</span> 
<span class='line'>3097</span> </span><span class="COMM">// === BEGIN X500Name Related =================================================</span><span class="WHIT">
<span class='line'>3098</span> </span><span class="COMM">/**
<span class='line'>3099</span>  * X500Name ASN.1 structure class
<span class='line'>3100</span>  * @name KJUR.asn1.x509.X500Name
<span class='line'>3101</span>  * @class X500Name ASN.1 structure class
<span class='line'>3102</span>  * @param {Array} params associative array of parameters (ex. {'str': '/C=US/O=a'})
<span class='line'>3103</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>3104</span>  * @see KJUR.asn1.x509.X500Name
<span class='line'>3105</span>  * @see KJUR.asn1.x509.RDN
<span class='line'>3106</span>  * @see KJUR.asn1.x509.AttributeTypeAndValue
<span class='line'>3107</span>  * @see X509#getX500Name
<span class='line'>3108</span>  * @description
<span class='line'>3109</span>  * This class provides DistinguishedName ASN.1 class structure
<span class='line'>3110</span>  * defined in &lt;a href="https://tools.ietf.org/html/rfc2253#section-2">RFC 2253 section 2&lt;/a>.
<span class='line'>3111</span>  * &lt;blockquote>&lt;pre>
<span class='line'>3112</span>  * DistinguishedName ::= RDNSequence
<span class='line'>3113</span>  * RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
<span class='line'>3114</span>  * RelativeDistinguishedName ::= SET SIZE (1..MAX) OF
<span class='line'>3115</span>  *   AttributeTypeAndValue
<span class='line'>3116</span>  * AttributeTypeAndValue ::= SEQUENCE {
<span class='line'>3117</span>  *   type  AttributeType,
<span class='line'>3118</span>  *   value AttributeValue }
<span class='line'>3119</span>  * &lt;/pre>&lt;/blockquote>
<span class='line'>3120</span>  * &lt;br/>
<span class='line'>3121</span>  * Argument for the constructor can be one of following parameters:
<span class='line'>3122</span>  * &lt;ul>
<span class='line'>3123</span>  * &lt;li>{Array}array - array of {@link KJUR.asn1.x509.RDN} parameter&lt;/li>
<span class='line'>3124</span>  * &lt;li>`String}str - string for distingish name in OpenSSL One line foramt (ex: /C=US/O=test/CN=test) See &lt;a href="https://github.com/kjur/jsrsasign/wiki/NOTE-distinguished-name-representation-in-jsrsasign">this&lt;/a> in detail.&lt;/li>
<span class='line'>3125</span>  * &lt;li>{String}ldapstr - string for distinguish name in LDAP format (ex: CN=test,O=test,C=US)&lt;/li>
<span class='line'>3126</span>  * &lt;li>{String}hex - hexadecimal string for ASN.1 distinguish name structure&lt;/li>
<span class='line'>3127</span>  * &lt;li>{String}certissuer - issuer name in the specified PEM certificate&lt;/li>
<span class='line'>3128</span>  * &lt;li>{String}certsubject - subject name in the specified PEM certificate&lt;/li>
<span class='line'>3129</span>  * &lt;li>{String}rule - DirectoryString rule (ex. "prn" or "utf8")&lt;/li>
<span class='line'>3130</span>  * &lt;/ul>
<span class='line'>3131</span>  * &lt;br/>
<span class='line'>3132</span>  * NOTE1: The "array" and "rule" parameters have been supported
<span class='line'>3133</span>  * since jsrsasign 9.0.0 asn1x509 2.0.0.
<span class='line'>3134</span>  * &lt;br/>
<span class='line'>3135</span>  * NOTE2: Multi-valued RDN in "str" parameter have been
<span class='line'>3136</span>  * supported since jsrsasign 6.2.1 asn1x509 1.0.17.
<span class='line'>3137</span>  * @example
<span class='line'>3138</span>  * // 1. construct with array
<span class='line'>3139</span>  * new KJUR.asn1.x509.X500Name({array:[
<span class='line'>3140</span>  *   [{type:'C',value:'JP',ds:'prn'}],
<span class='line'>3141</span>  *   [{type:'O',value:'aaa',ds:'utf8'}, // multi-valued RDN
<span class='line'>3142</span>  *    {type:'CN',value:'bob@example.com',ds:'ia5'}]
<span class='line'>3143</span>  * ]})
<span class='line'>3144</span>  * // 2. construct with string
<span class='line'>3145</span>  * new KJUR.asn1.x509.X500Name({str: "/C=US/ST=NY/L=Ballston Spa/STREET=915 Stillwater Ave"});
<span class='line'>3146</span>  * new KJUR.asn1.x509.X500Name({str: "/CN=AAA/2.5.4.42=John/surname=Ray"});
<span class='line'>3147</span>  * new KJUR.asn1.x509.X500Name({str: "/C=US/O=aaa+CN=contact@example.com"}); // multi valued
<span class='line'>3148</span>  * // 3. construct by LDAP string
<span class='line'>3149</span>  * new KJUR.asn1.x509.X500Name({ldapstr: "CN=foo@example.com,OU=bbb,C=US"});
<span class='line'>3150</span>  * // 4. construct by ASN.1 hex string
<span class='line'>3151</span>  * new KJUR.asn1.x509.X500Name({hex: "304c3120..."});
<span class='line'>3152</span>  * // 5. construct by issuer of PEM certificate
<span class='line'>3153</span>  * new KJUR.asn1.x509.X500Name({certsubject: "-----BEGIN CERT..."});
<span class='line'>3154</span>  * // 6. construct by subject of PEM certificate
<span class='line'>3155</span>  * new KJUR.asn1.x509.X500Name({certissuer: "-----BEGIN CERT..."});
<span class='line'>3156</span>  * // 7. construct by object (DEPRECATED)
<span class='line'>3157</span>  * new KJUR.asn1.x509.X500Name({C:"US",O:"aaa",CN:"http://example.com/"});
<span class='line'>3158</span>  */</span><span class="WHIT">
<span class='line'>3159</span> </span><span class="NAME">KJUR.asn1.x509.X500Name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3160</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.X500Name.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3161</span> </span><span class="WHIT">    </span><span class="NAME">this.asn1Array</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3162</span> </span><span class="WHIT">    </span><span class="NAME">this.paramArray</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3163</span> </span><span class="WHIT">    </span><span class="NAME">this.sRule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"utf8"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3164</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3165</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3166</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3167</span> </span><span class="WHIT">	</span><span class="NAME">_RDN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.RDN</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3168</span> </span><span class="WHIT">	</span><span class="NAME">_pemtohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pemtohex</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3169</span> 
<span class='line'>3170</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>3171</span>      * set DN by OpenSSL oneline distinguished name string&lt;br/>
<span class='line'>3172</span>      * @name setByString
<span class='line'>3173</span>      * @memberOf KJUR.asn1.x509.X500Name#
<span class='line'>3174</span>      * @function
<span class='line'>3175</span>      * @param {String} dnStr distinguished name by string (ex. /C=US/O=aaa)
<span class='line'>3176</span>      * @description
<span class='line'>3177</span>      * Sets distinguished name by string. 
<span class='line'>3178</span>      * dnStr must be formatted as 
<span class='line'>3179</span>      * "/type0=value0/type1=value1/type2=value2...".
<span class='line'>3180</span>      * No need to escape a slash in an attribute value.
<span class='line'>3181</span>      * @example
<span class='line'>3182</span>      * name = new KJUR.asn1.x509.X500Name();
<span class='line'>3183</span>      * name.setByString("/C=US/O=aaa/OU=bbb/CN=foo@example.com");
<span class='line'>3184</span>      * // no need to escape slash in an attribute value
<span class='line'>3185</span>      * name.setByString("/C=US/O=aaa/CN=1980/12/31");
<span class='line'>3186</span>      */</span><span class="WHIT">
<span class='line'>3187</span> </span><span class="WHIT">    </span><span class="NAME">this.setByString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">dnStr</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sRule</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3188</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">sRule</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.sRule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sRule</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3189</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dnStr.split</span><span class="PUNC">(</span><span class="STRN">'/'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3190</span> </span><span class="WHIT">        </span><span class="NAME">a.shift</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3191</span> 
<span class='line'>3192</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3193</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3194</span> </span><span class="WHIT">	  </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">match</span><span class="PUNC">(</span><span class="REGX">/^[^=]+=.+$/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3195</span> </span><span class="WHIT">	    </span><span class="NAME">a1.push</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3196</span> </span><span class="WHIT">	  </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3197</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">lastidx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a1.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3198</span> </span><span class="WHIT">	    </span><span class="NAME">a1</span><span class="PUNC">[</span><span class="NAME">lastidx</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a1</span><span class="PUNC">[</span><span class="NAME">lastidx</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"/"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3199</span> </span><span class="WHIT">	  </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3200</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3201</span> 
<span class='line'>3202</span> </span><span class="WHIT">        </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a1.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3203</span> </span><span class="WHIT">            </span><span class="NAME">this.asn1Array.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_RDN</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'str'</span><span class="PUNC">:</span><span class="NAME">a1</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">rule</span><span class="PUNC">:</span><span class="NAME">this.sRule</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3204</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3205</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3206</span> 
<span class='line'>3207</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>3208</span>      * set DN by LDAP(RFC 2253) distinguished name string&lt;br/>
<span class='line'>3209</span>      * @name setByLdapString
<span class='line'>3210</span>      * @memberOf KJUR.asn1.x509.X500Name#
<span class='line'>3211</span>      * @function
<span class='line'>3212</span>      * @param {String} dnStr distinguished name by LDAP string (ex. O=aaa,C=US)
<span class='line'>3213</span>      * @since jsrsasign 6.2.2 asn1x509 1.0.18
<span class='line'>3214</span>      * @see {@link KJUR.asn1.x509.X500Name.ldapToCompat}
<span class='line'>3215</span>      * @description
<span class='line'>3216</span>      * @example
<span class='line'>3217</span>      * name = new KJUR.asn1.x509.X500Name();
<span class='line'>3218</span>      * name.setByLdapString("CN=foo@example.com,OU=bbb,O=aaa,C=US");
<span class='line'>3219</span>      */</span><span class="WHIT">
<span class='line'>3220</span> </span><span class="WHIT">    </span><span class="NAME">this.setByLdapString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">dnStr</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sRule</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3221</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">sRule</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.sRule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sRule</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3222</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">compat</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.X500Name.ldapToCompat</span><span class="PUNC">(</span><span class="NAME">dnStr</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3223</span> </span><span class="WHIT">	</span><span class="NAME">this.setByString</span><span class="PUNC">(</span><span class="NAME">compat</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sRule</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3224</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3225</span> 
<span class='line'>3226</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>3227</span>      * set DN by associative array&lt;br/>
<span class='line'>3228</span>      * @name setByObject
<span class='line'>3229</span>      * @memberOf KJUR.asn1.x509.X500Name#
<span class='line'>3230</span>      * @function
<span class='line'>3231</span>      * @param {Array} dnObj associative array of DN (ex. {C: "US", O: "aaa"})
<span class='line'>3232</span>      * @since jsrsasign 4.9. asn1x509 1.0.13
<span class='line'>3233</span>      * @description
<span class='line'>3234</span>      * @example
<span class='line'>3235</span>      * name = new KJUR.asn1.x509.X500Name();
<span class='line'>3236</span>      * name.setByObject({C: "US", O: "aaa", CN="http://example.com/"1});
<span class='line'>3237</span>      */</span><span class="WHIT">
<span class='line'>3238</span> </span><span class="WHIT">    </span><span class="NAME">this.setByObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">dnObj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sRule</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3239</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">sRule</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.sRule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sRule</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3240</span> 
<span class='line'>3241</span> </span><span class="WHIT">        </span><span class="COMM">// Get all the dnObject attributes and stuff them in the ASN.1 array.</span><span class="WHIT">
<span class='line'>3242</span> </span><span class="WHIT">        </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">dnObj</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3243</span> </span><span class="WHIT">            </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">dnObj.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3244</span> </span><span class="WHIT">                </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">newRDN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_RDN</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">str</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'='</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">dnObj</span><span class="PUNC">[</span><span class="NAME">x</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">rule</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.sRule</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3245</span> </span><span class="WHIT">                </span><span class="COMM">// Initialize or push into the ANS1 array.</span><span class="WHIT">
<span class='line'>3246</span> </span><span class="WHIT">                </span><span class="NAME">this.asn1Array</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">this.asn1Array.push</span><span class="PUNC">(</span><span class="NAME">newRDN</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>3247</span> </span><span class="WHIT">                    </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.asn1Array</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">newRDN</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3248</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3249</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3250</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3251</span> 
<span class='line'>3252</span> </span><span class="WHIT">    </span><span class="NAME">this.setByParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3253</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.rule</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.sRule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.rule</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3254</span> 
<span class='line'>3255</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.array</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3256</span> </span><span class="WHIT">	    </span><span class="NAME">this.paramArray</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.array</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3257</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3258</span> </span><span class="WHIT">            </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.str</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3259</span> </span><span class="WHIT">		</span><span class="NAME">this.setByString</span><span class="PUNC">(</span><span class="NAME">params.str</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3260</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.ldapstr</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3261</span> </span><span class="WHIT">		</span><span class="NAME">this.setByLdapString</span><span class="PUNC">(</span><span class="NAME">params.ldapstr</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3262</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.hex</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3263</span> </span><span class="WHIT">		</span><span class="NAME">this.hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.hex</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3264</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.certissuer</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3265</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">X509</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3266</span> </span><span class="WHIT">		</span><span class="NAME">x.readCertPEM</span><span class="PUNC">(</span><span class="NAME">params.certissuer</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3267</span> </span><span class="WHIT">		</span><span class="NAME">this.hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">x.getIssuerHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3268</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.certsubject</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3269</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">X509</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3270</span> </span><span class="WHIT">		</span><span class="NAME">x.readCertPEM</span><span class="PUNC">(</span><span class="NAME">params.certsubject</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3271</span> </span><span class="WHIT">		</span><span class="NAME">this.hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">x.getSubjectHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3272</span> </span><span class="WHIT">		</span><span class="COMM">// If params is an object, then set the ASN1 array</span><span class="WHIT">
<span class='line'>3273</span> </span><span class="WHIT">		</span><span class="COMM">// just using the object attributes. </span><span class="WHIT">
<span class='line'>3274</span> </span><span class="WHIT">		</span><span class="COMM">// This is nice for fields that have lots of special</span><span class="WHIT">
<span class='line'>3275</span> </span><span class="WHIT">		</span><span class="COMM">// characters (i.e. CN: 'https://www.github.com/kjur//').</span><span class="WHIT">
<span class='line'>3276</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"object"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>3277</span> </span><span class="WHIT">		       </span><span class="NAME">params.certsubject</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>3278</span> </span><span class="WHIT">		       </span><span class="NAME">params.certissuer</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3279</span> </span><span class="WHIT">		</span><span class="NAME">this.setByObject</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3280</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3281</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3282</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3283</span> 
<span class='line'>3284</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3285</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">this.hTLV</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.hTLV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3286</span> 
<span class='line'>3287</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.asn1Array.length</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this.paramArray.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3288</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">this.paramArray.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3289</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">param</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.paramArray</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3290</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.sRule</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"utf8"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">param.rule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.sRule</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3291</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1RDN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_RDN</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3292</span> </span><span class="WHIT">		</span><span class="NAME">this.asn1Array.push</span><span class="PUNC">(</span><span class="NAME">asn1RDN</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3293</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3294</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3295</span> 
<span class='line'>3296</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">"array"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.asn1Array</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3297</span> </span><span class="WHIT">        </span><span class="NAME">this.hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">o.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3298</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.hTLV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3299</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3300</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3301</span> 
<span class='line'>3302</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3303</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3304</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.X500Name</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3305</span> 
<span class='line'>3306</span> </span><span class="COMM">/**
<span class='line'>3307</span>  * convert OpenSSL compat distinguished name format string to LDAP(RFC 2253) format&lt;br/>
<span class='line'>3308</span>  * @name compatToLDAP
<span class='line'>3309</span>  * @memberOf KJUR.asn1.x509.X500Name
<span class='line'>3310</span>  * @function
<span class='line'>3311</span>  * @param {String} s distinguished name string in OpenSSL oneline compat (ex. /C=US/O=test)
<span class='line'>3312</span>  * @return {String} distinguished name string in LDAP(RFC 2253) format (ex. O=test,C=US)
<span class='line'>3313</span>  * @since jsrsasign 8.0.19 asn1x509 1.1.20
<span class='line'>3314</span>  * @description
<span class='line'>3315</span>  * This static method converts a distinguished name string in OpenSSL compat
<span class='line'>3316</span>  * format to LDAP(RFC 2253) format.
<span class='line'>3317</span>  * @see &lt;a href="https://github.com/kjur/jsrsasign/wiki/NOTE-distinguished-name-representation-in-jsrsasign">jsrsasign wiki: distinguished name string difference between OpenSSL compat and LDAP(RFC 2253)&lt;/a>
<span class='line'>3318</span>  * @see &lt;a href="https://www.openssl.org/docs/man1.0.2/man1/openssl-x509.html#NAME-OPTIONS">OpenSSL x509 command manual - NAME OPTIONS&lt;/a>
<span class='line'>3319</span>  * @example
<span class='line'>3320</span>  * KJUR.asn1.x509.X500Name.compatToLDAP("/C=US/O=test") &rarr; 'O=test,C=US'
<span class='line'>3321</span>  * KJUR.asn1.x509.X500Name.compatToLDAP("/C=US/O=a,a") &rarr; 'O=a\,a,C=US'
<span class='line'>3322</span>  */</span><span class="WHIT">
<span class='line'>3323</span> </span><span class="NAME">KJUR.asn1.x509.X500Name.compatToLDAP</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3324</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">s.substr</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="STRN">"/"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"malformed input"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3325</span> 
<span class='line'>3326</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3327</span> </span><span class="WHIT">    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">s.substr</span><span class="PUNC">(</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3328</span> 
<span class='line'>3329</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">s.split</span><span class="PUNC">(</span><span class="STRN">"/"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3330</span> </span><span class="WHIT">    </span><span class="NAME">a.reverse</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3331</span> </span><span class="WHIT">    </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a.map</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">s.replace</span><span class="PUNC">(</span><span class="REGX">/,/</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"\\,"</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3332</span> 
<span class='line'>3333</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">a.join</span><span class="PUNC">(</span><span class="STRN">","</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3334</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3335</span> 
<span class='line'>3336</span> </span><span class="COMM">/**
<span class='line'>3337</span>  * convert OpenSSL compat distinguished name format string to LDAP(RFC 2253) format (DEPRECATED)&lt;br/>
<span class='line'>3338</span>  * @name onelineToLDAP
<span class='line'>3339</span>  * @memberOf KJUR.asn1.x509.X500Name
<span class='line'>3340</span>  * @function
<span class='line'>3341</span>  * @param {String} s distinguished name string in OpenSSL compat format (ex. /C=US/O=test)
<span class='line'>3342</span>  * @return {String} distinguished name string in LDAP(RFC 2253) format (ex. O=test,C=US)
<span class='line'>3343</span>  * @since jsrsasign 6.2.2 asn1x509 1.0.18
<span class='line'>3344</span>  * @see KJUR.asn1.x509.X500Name.compatToLDAP
<span class='line'>3345</span>  * @description
<span class='line'>3346</span>  * This method is deprecated. Please use 
<span class='line'>3347</span>  * {@link KJUR.asn1.x509.X500Name.compatToLDAP} instead.
<span class='line'>3348</span>  */</span><span class="WHIT">
<span class='line'>3349</span> </span><span class="NAME">KJUR.asn1.x509.X500Name.onelineToLDAP</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3350</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.X500Name.compatToLDAP</span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3351</span> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3352</span> 
<span class='line'>3353</span> </span><span class="COMM">/**
<span class='line'>3354</span>  * convert LDAP(RFC 2253) distinguished name format string to OpenSSL compat format&lt;br/>
<span class='line'>3355</span>  * @name ldapToCompat
<span class='line'>3356</span>  * @memberOf KJUR.asn1.x509.X500Name
<span class='line'>3357</span>  * @function
<span class='line'>3358</span>  * @param {String} s distinguished name string in LDAP(RFC 2253) format (ex. O=test,C=US)
<span class='line'>3359</span>  * @return {String} distinguished name string in OpenSSL compat format (ex. /C=US/O=test)
<span class='line'>3360</span>  * @since jsrsasign 8.0.19 asn1x509 1.1.10
<span class='line'>3361</span>  * @description
<span class='line'>3362</span>  * This static method converts a distinguished name string in 
<span class='line'>3363</span>  * LDAP(RFC 2253) format to OpenSSL compat format.
<span class='line'>3364</span>  * @see &lt;a href="https://github.com/kjur/jsrsasign/wiki/NOTE-distinguished-name-representation-in-jsrsasign">jsrsasign wiki: distinguished name string difference between OpenSSL compat and LDAP(RFC 2253)&lt;/a>
<span class='line'>3365</span>  * @example
<span class='line'>3366</span>  * KJUR.asn1.x509.X500Name.ldapToCompat('O=test,C=US') &rarr; '/C=US/O=test'
<span class='line'>3367</span>  * KJUR.asn1.x509.X500Name.ldapToCompat('O=a\,a,C=US') &rarr; '/C=US/O=a,a'
<span class='line'>3368</span>  * KJUR.asn1.x509.X500Name.ldapToCompat('O=a/a,C=US')  &rarr; '/C=US/O=a\/a'
<span class='line'>3369</span>  */</span><span class="WHIT">
<span class='line'>3370</span> </span><span class="NAME">KJUR.asn1.x509.X500Name.ldapToCompat</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3371</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">s.split</span><span class="PUNC">(</span><span class="STRN">","</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3372</span> 
<span class='line'>3373</span> </span><span class="WHIT">    </span><span class="COMM">// join \,</span><span class="WHIT">
<span class='line'>3374</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">isBSbefore</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3375</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3376</span> </span><span class="WHIT">    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3377</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">item</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a.shift</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3378</span> </span><span class="WHIT">	</span><span class="COMM">//console.log("item=" + item);</span><span class="WHIT">
<span class='line'>3379</span> 
<span class='line'>3380</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">isBSbefore</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3381</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a2last</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a2.pop</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3382</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">newitem</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a2last</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">","</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">item</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">replace</span><span class="PUNC">(</span><span class="REGX">/\\,/g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">","</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3383</span> </span><span class="WHIT">	    </span><span class="NAME">a2.push</span><span class="PUNC">(</span><span class="NAME">newitem</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3384</span> </span><span class="WHIT">	    </span><span class="NAME">isBSbefore</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3385</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3386</span> </span><span class="WHIT">	    </span><span class="NAME">a2.push</span><span class="PUNC">(</span><span class="NAME">item</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3387</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3388</span> 
<span class='line'>3389</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">item.substr</span><span class="PUNC">(</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"\\"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">isBSbefore</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3390</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3391</span> 
<span class='line'>3392</span> </span><span class="WHIT">    </span><span class="NAME">a2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a2.map</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">s.replace</span><span class="PUNC">(</span><span class="STRN">"/"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"\\/"</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3393</span> </span><span class="WHIT">    </span><span class="NAME">a2.reverse</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3394</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"/"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">a2.join</span><span class="PUNC">(</span><span class="STRN">"/"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3395</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3396</span> 
<span class='line'>3397</span> </span><span class="COMM">/**
<span class='line'>3398</span>  * convert LDAP(RFC 2253) distinguished name format string to OpenSSL compat format (DEPRECATED)&lt;br/>
<span class='line'>3399</span>  * @name ldapToOneline
<span class='line'>3400</span>  * @memberOf KJUR.asn1.x509.X500Name
<span class='line'>3401</span>  * @function
<span class='line'>3402</span>  * @param {String} s distinguished name string in LDAP(RFC 2253) format (ex. O=test,C=US)
<span class='line'>3403</span>  * @return {String} distinguished name string in OpenSSL compat format (ex. /C=US/O=test)
<span class='line'>3404</span>  * @since jsrsasign 6.2.2 asn1x509 1.0.18
<span class='line'>3405</span>  * @description
<span class='line'>3406</span>  * This method is deprecated. Please use 
<span class='line'>3407</span>  * {@link KJUR.asn1.x509.X500Name.ldapToCompat} instead.
<span class='line'>3408</span>  */</span><span class="WHIT">
<span class='line'>3409</span> </span><span class="NAME">KJUR.asn1.x509.X500Name.ldapToOneline</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3410</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.X500Name.ldapToCompat</span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3411</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3412</span> 
<span class='line'>3413</span> </span><span class="COMM">/**
<span class='line'>3414</span>  * RDN (Relative Distinguished Name) ASN.1 structure class
<span class='line'>3415</span>  * @name KJUR.asn1.x509.RDN
<span class='line'>3416</span>  * @class RDN (Relative Distinguished Name) ASN.1 structure class
<span class='line'>3417</span>  * @param {Array} params associative array of parameters (ex. {'str': 'C=US'})
<span class='line'>3418</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>3419</span>  * @see KJUR.asn1.x509.X500Name
<span class='line'>3420</span>  * @see KJUR.asn1.x509.RDN
<span class='line'>3421</span>  * @see KJUR.asn1.x509.AttributeTypeAndValue
<span class='line'>3422</span>  * @description
<span class='line'>3423</span>  * This class provides RelativeDistinguishedName ASN.1 class structure
<span class='line'>3424</span>  * defined in &lt;a href="https://tools.ietf.org/html/rfc2253#section-2">RFC 2253 section 2&lt;/a>.
<span class='line'>3425</span>  * &lt;blockquote>&lt;pre>
<span class='line'>3426</span>  * RelativeDistinguishedName ::= SET SIZE (1..MAX) OF
<span class='line'>3427</span>  *   AttributeTypeAndValue
<span class='line'>3428</span>  *
<span class='line'>3429</span>  * AttributeTypeAndValue ::= SEQUENCE {
<span class='line'>3430</span>  *   type  AttributeType,
<span class='line'>3431</span>  *   value AttributeValue }
<span class='line'>3432</span>  * &lt;/pre>&lt;/blockquote>
<span class='line'>3433</span>  * &lt;br/>
<span class='line'>3434</span>  * NOTE1: The "array" and "rule" parameters have been supported
<span class='line'>3435</span>  * since jsrsasign 9.0.0 asn1x509 2.0.0.
<span class='line'>3436</span>  * &lt;br/>
<span class='line'>3437</span>  * NOTE2: Multi-valued RDN in "str" parameter have been
<span class='line'>3438</span>  * supported since jsrsasign 6.2.1 asn1x509 1.0.17.
<span class='line'>3439</span>  * @example
<span class='line'>3440</span>  * new KJUR.asn1.x509.RDN({array: [ // multi-valued
<span class='line'>3441</span>  *    {type:"CN",value:"Bob",ds:"prn"},
<span class='line'>3442</span>  *    {type:"CN",value:"bob@example.com", ds:"ia5"}
<span class='line'>3443</span>  * ]});
<span class='line'>3444</span>  * new KJUR.asn1.x509.RDN({str: "CN=test"});
<span class='line'>3445</span>  * new KJUR.asn1.x509.RDN({str: "O=a+O=bb+O=c"}); // multi-valued
<span class='line'>3446</span>  * new KJUR.asn1.x509.RDN({str: "O=a+O=b\\+b+O=c"}); // plus escaped
<span class='line'>3447</span>  * new KJUR.asn1.x509.RDN({str: "O=a+O=\"b+b\"+O=c"}); // double quoted
<span class='line'>3448</span>  */</span><span class="WHIT">
<span class='line'>3449</span> </span><span class="NAME">KJUR.asn1.x509.RDN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3450</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.RDN.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3451</span> </span><span class="WHIT">    </span><span class="NAME">this.asn1Array</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3452</span> </span><span class="WHIT">    </span><span class="NAME">this.paramArray</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3453</span> </span><span class="WHIT">    </span><span class="NAME">this.sRule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"utf8"</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// DEFAULT "utf8"</span><span class="WHIT">
<span class='line'>3454</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_AttributeTypeAndValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.AttributeTypeAndValue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3455</span> 
<span class='line'>3456</span> </span><span class="WHIT">    </span><span class="NAME">this.setByParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3457</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.rule</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.sRule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.rule</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3458</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.str</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3459</span> </span><span class="WHIT">            </span><span class="NAME">this.addByMultiValuedString</span><span class="PUNC">(</span><span class="NAME">params.str</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3460</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3461</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.array</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.paramArray</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.array</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3462</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3463</span> 
<span class='line'>3464</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>3465</span>      * add one AttributeTypeAndValue by string&lt;br/>
<span class='line'>3466</span>      * @name addByString
<span class='line'>3467</span>      * @memberOf KJUR.asn1.x509.RDN#
<span class='line'>3468</span>      * @function
<span class='line'>3469</span>      * @param {String} s string of AttributeTypeAndValue
<span class='line'>3470</span>      * @return {Object} unspecified
<span class='line'>3471</span>      * @description
<span class='line'>3472</span>      * This method add one AttributeTypeAndValue to RDN object.
<span class='line'>3473</span>      * @example
<span class='line'>3474</span>      * rdn = new KJUR.asn1.x509.RDN();
<span class='line'>3475</span>      * rdn.addByString("CN=john");
<span class='line'>3476</span>      * rdn.addByString("serialNumber=1234"); // for multi-valued RDN
<span class='line'>3477</span>      */</span><span class="WHIT">
<span class='line'>3478</span> </span><span class="WHIT">    </span><span class="NAME">this.addByString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3479</span> </span><span class="WHIT">        </span><span class="NAME">this.asn1Array.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.AttributeTypeAndValue</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'str'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">s</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">rule</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.sRule</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3480</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3481</span> 
<span class='line'>3482</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>3483</span>      * add one AttributeTypeAndValue by multi-valued string&lt;br/>
<span class='line'>3484</span>      * @name addByMultiValuedString
<span class='line'>3485</span>      * @memberOf KJUR.asn1.x509.RDN#
<span class='line'>3486</span>      * @function
<span class='line'>3487</span>      * @param {String} s string of multi-valued RDN
<span class='line'>3488</span>      * @return {Object} unspecified
<span class='line'>3489</span>      * @since jsrsasign 6.2.1 asn1x509 1.0.17
<span class='line'>3490</span>      * @description
<span class='line'>3491</span>      * This method add multi-valued RDN to RDN object.
<span class='line'>3492</span>      * @example
<span class='line'>3493</span>      * rdn = new KJUR.asn1.x509.RDN();
<span class='line'>3494</span>      * rdn.addByMultiValuedString("CN=john+O=test");
<span class='line'>3495</span>      * rdn.addByMultiValuedString("O=a+O=b\+b\+b+O=c"); // multi-valued RDN with quoted plus
<span class='line'>3496</span>      * rdn.addByMultiValuedString("O=a+O=\"b+b+b\"+O=c"); // multi-valued RDN with quoted quotation
<span class='line'>3497</span>      */</span><span class="WHIT">
<span class='line'>3498</span> </span><span class="WHIT">    </span><span class="NAME">this.addByMultiValuedString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3499</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.RDN.parseString</span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3500</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3501</span> </span><span class="WHIT">	    </span><span class="NAME">this.addByString</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3502</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3503</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3504</span> 
<span class='line'>3505</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3506</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.asn1Array.length</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this.paramArray.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3507</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">this.paramArray.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3508</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">param</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.paramArray</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3509</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">param.rule</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>3510</span> </span><span class="WHIT">		    </span><span class="NAME">this.sRule</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"utf8"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3511</span> </span><span class="WHIT">		    </span><span class="NAME">param.rule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.sRule</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3512</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3513</span> </span><span class="WHIT">		</span><span class="COMM">//alert(JSON.stringify(param));</span><span class="WHIT">
<span class='line'>3514</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1ATV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_AttributeTypeAndValue</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3515</span> </span><span class="WHIT">		</span><span class="NAME">this.asn1Array.push</span><span class="PUNC">(</span><span class="NAME">asn1ATV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3516</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3517</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3518</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DERSet</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">"array"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.asn1Array</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3519</span> </span><span class="WHIT">        </span><span class="NAME">this.TLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">o.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3520</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.TLV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3521</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3522</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3523</span> 
<span class='line'>3524</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3525</span> </span><span class="WHIT">	</span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3526</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3527</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3528</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.RDN</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3529</span> 
<span class='line'>3530</span> </span><span class="COMM">/**
<span class='line'>3531</span>  * parse multi-valued RDN string and split into array of 'AttributeTypeAndValue'&lt;br/>
<span class='line'>3532</span>  * @name parseString
<span class='line'>3533</span>  * @memberOf KJUR.asn1.x509.RDN
<span class='line'>3534</span>  * @function
<span class='line'>3535</span>  * @param {String} s multi-valued string of RDN
<span class='line'>3536</span>  * @return {Array} array of string of AttributeTypeAndValue
<span class='line'>3537</span>  * @since jsrsasign 6.2.1 asn1x509 1.0.17
<span class='line'>3538</span>  * @description
<span class='line'>3539</span>  * This static method parses multi-valued RDN string and split into
<span class='line'>3540</span>  * array of AttributeTypeAndValue.
<span class='line'>3541</span>  * @example
<span class='line'>3542</span>  * KJUR.asn1.x509.RDN.parseString("CN=john") &rarr; ["CN=john"]
<span class='line'>3543</span>  * KJUR.asn1.x509.RDN.parseString("CN=john+OU=test") &rarr; ["CN=john", "OU=test"]
<span class='line'>3544</span>  * KJUR.asn1.x509.RDN.parseString('CN="jo+hn"+OU=test') &rarr; ["CN=jo+hn", "OU=test"]
<span class='line'>3545</span>  * KJUR.asn1.x509.RDN.parseString('CN=jo\+hn+OU=test') &rarr; ["CN=jo+hn", "OU=test"]
<span class='line'>3546</span>  * KJUR.asn1.x509.RDN.parseString("CN=john+OU=test+OU=t1") &rarr; ["CN=john", "OU=test", "OU=t1"]
<span class='line'>3547</span>  */</span><span class="WHIT">
<span class='line'>3548</span> </span><span class="NAME">KJUR.asn1.x509.RDN.parseString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3549</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">s.split</span><span class="PUNC">(</span><span class="REGX">/\+/</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3550</span> 
<span class='line'>3551</span> </span><span class="WHIT">    </span><span class="COMM">// join \+</span><span class="WHIT">
<span class='line'>3552</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">isBSbefore</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3553</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3554</span> </span><span class="WHIT">    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3555</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">item</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a.shift</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3556</span> </span><span class="WHIT">	</span><span class="COMM">//console.log("item=" + item);</span><span class="WHIT">
<span class='line'>3557</span> 
<span class='line'>3558</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">isBSbefore</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3559</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a2last</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a2.pop</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3560</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">newitem</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a2last</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"+"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">item</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">replace</span><span class="PUNC">(</span><span class="REGX">/\\\+/g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"+"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3561</span> </span><span class="WHIT">	    </span><span class="NAME">a2.push</span><span class="PUNC">(</span><span class="NAME">newitem</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3562</span> </span><span class="WHIT">	    </span><span class="NAME">isBSbefore</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3563</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3564</span> </span><span class="WHIT">	    </span><span class="NAME">a2.push</span><span class="PUNC">(</span><span class="NAME">item</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3565</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3566</span> 
<span class='line'>3567</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">item.substr</span><span class="PUNC">(</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"\\"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">isBSbefore</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3568</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3569</span> 
<span class='line'>3570</span> </span><span class="WHIT">    </span><span class="COMM">// join quote</span><span class="WHIT">
<span class='line'>3571</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">beginQuote</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3572</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a3</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3573</span> </span><span class="WHIT">    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">a2.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3574</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">item</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a2.shift</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3575</span> 
<span class='line'>3576</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">beginQuote</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3577</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a3last</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a3.pop</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3578</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">item.match</span><span class="PUNC">(</span><span class="REGX">/"$/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3579</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">newitem</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a3last</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"+"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">item</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">replace</span><span class="PUNC">(</span><span class="REGX">/^([^=]+)="(.*)"$/</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"$1=$2"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3580</span> </span><span class="WHIT">		</span><span class="NAME">a3.push</span><span class="PUNC">(</span><span class="NAME">newitem</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3581</span> </span><span class="WHIT">		</span><span class="NAME">beginQuote</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3582</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3583</span> </span><span class="WHIT">		</span><span class="NAME">a3.push</span><span class="PUNC">(</span><span class="NAME">a3last</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"+"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">item</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3584</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3585</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3586</span> </span><span class="WHIT">	    </span><span class="NAME">a3.push</span><span class="PUNC">(</span><span class="NAME">item</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3587</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3588</span> 
<span class='line'>3589</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">item.match</span><span class="PUNC">(</span><span class="REGX">/^[^=]+="/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3590</span> </span><span class="WHIT">	    </span><span class="COMM">//console.log(i + "=" + item);</span><span class="WHIT">
<span class='line'>3591</span> </span><span class="WHIT">	    </span><span class="NAME">beginQuote</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3592</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3593</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3594</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">a3</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3595</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3596</span> 
<span class='line'>3597</span> </span><span class="COMM">/**
<span class='line'>3598</span>  * AttributeTypeAndValue ASN.1 structure class
<span class='line'>3599</span>  * @name KJUR.asn1.x509.AttributeTypeAndValue
<span class='line'>3600</span>  * @class AttributeTypeAndValue ASN.1 structure class
<span class='line'>3601</span>  * @param {Array} params JSON object for parameters (ex. {str: 'C=US'})
<span class='line'>3602</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>3603</span>  * @see KJUR.asn1.x509.X500Name
<span class='line'>3604</span>  * @see KJUR.asn1.x509.RDN
<span class='line'>3605</span>  * @see KJUR.asn1.x509.AttributeTypeAndValue
<span class='line'>3606</span>  * @see X509#getAttrTypeAndValue
<span class='line'>3607</span>  * @description
<span class='line'>3608</span>  * This class generates AttributeTypeAndValue defined in
<span class='line'>3609</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.1.2.4">
<span class='line'>3610</span>  * RFC 5280 4.1.2.4&lt;/a>.
<span class='line'>3611</span>  * &lt;pre>
<span class='line'>3612</span>  * AttributeTypeAndValue ::= SEQUENCE {
<span class='line'>3613</span>  *   type     AttributeType,
<span class='line'>3614</span>  *   value    AttributeValue }
<span class='line'>3615</span>  * AttributeType ::= OBJECT IDENTIFIER
<span class='line'>3616</span>  * AttributeValue ::= ANY -- DEFINED BY AttributeType
<span class='line'>3617</span>  * &lt;/pre>
<span class='line'>3618</span>  * The constructor argument can have following parameters:
<span class='line'>3619</span>  * &lt;ul>
<span class='line'>3620</span>  * &lt;li>{String}type - AttributeType name or OID(ex. C,O,CN)&lt;/li>
<span class='line'>3621</span>  * &lt;li>{String}value - raw string of ASN.1 value of AttributeValue&lt;/li>
<span class='line'>3622</span>  * &lt;li>{String}ds - DirectoryString type of AttributeValue&lt;/li>
<span class='line'>3623</span>  * &lt;li>{String}rule - DirectoryString type rule (ex. "prn" or "utf8")
<span class='line'>3624</span>  * set DirectoryString type automatically when "ds" not specified.&lt;/li>
<span class='line'>3625</span>  * &lt;li>{String}str - AttributeTypeAndVale string (ex. "C=US").
<span class='line'>3626</span>  * When type and value don't exists, 
<span class='line'>3627</span>  * this "str" will be converted to "type" and "value".
<span class='line'>3628</span>  * &lt;/li>
<span class='line'>3629</span>  * &lt;/ul>
<span class='line'>3630</span>  * &lt;br
<span class='line'>3631</span>  * NOTE: Parameters "type", "value,", "ds" and "rule" have
<span class='line'>3632</span>  * been supported since jsrsasign 9.0.0 asn1x509 2.0.0.
<span class='line'>3633</span>  * @example
<span class='line'>3634</span>  * new KJUR.asn1.x509.AttributeTypeAndValue({type:'C',value:'US',ds:'prn'})
<span class='line'>3635</span>  * new KJUR.asn1.x509.AttributeTypeAndValue({type:'givenName',value:'John',ds:'prn'})
<span class='line'>3636</span>  * new KJUR.asn1.x509.AttributeTypeAndValue({type:'2.5.4.9',value:'71 Bowman St',ds:'prn'})
<span class='line'>3637</span>  * new KJUR.asn1.x509.AttributeTypeAndValue({str:'O=T1'})
<span class='line'>3638</span>  * new KJUR.asn1.x509.AttributeTypeAndValue({str:'streetAddress=71 Bowman St'})
<span class='line'>3639</span>  * new KJUR.asn1.x509.AttributeTypeAndValue({str:'O=T1',rule='prn'})
<span class='line'>3640</span>  * new KJUR.asn1.x509.AttributeTypeAndValue({str:'O=T1',rule='utf8'})
<span class='line'>3641</span>  */</span><span class="WHIT">
<span class='line'>3642</span> </span><span class="NAME">KJUR.asn1.x509.AttributeTypeAndValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3643</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.AttributeTypeAndValue.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3644</span> </span><span class="WHIT">    </span><span class="NAME">this.sRule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"utf8"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3645</span> </span><span class="WHIT">    </span><span class="NAME">this.sType</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3646</span> </span><span class="WHIT">    </span><span class="NAME">this.sValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3647</span> </span><span class="WHIT">    </span><span class="NAME">this.dsType</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3648</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3649</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3650</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3651</span> </span><span class="WHIT">	</span><span class="NAME">_DERUTF8String</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERUTF8String</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3652</span> </span><span class="WHIT">	</span><span class="NAME">_DERPrintableString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERPrintableString</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3653</span> </span><span class="WHIT">	</span><span class="NAME">_DERTeletexString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERTeletexString</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3654</span> </span><span class="WHIT">	</span><span class="NAME">_DERIA5String</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERIA5String</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3655</span> </span><span class="WHIT">	</span><span class="NAME">_DERVisibleString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERVisibleString</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3656</span> </span><span class="WHIT">	</span><span class="NAME">_DERBMPString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERBMPString</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3657</span> </span><span class="WHIT">	</span><span class="NAME">_isMail</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.lang.String.isMail</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3658</span> </span><span class="WHIT">	</span><span class="NAME">_isPrintable</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.lang.String.isPrintable</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3659</span> 
<span class='line'>3660</span> </span><span class="WHIT">    </span><span class="NAME">this.setByParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3661</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.rule</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.sRule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.rule</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3662</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.ds</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">   </span><span class="NAME">this.dsType</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.ds</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3663</span> 
<span class='line'>3664</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.value</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>3665</span> </span><span class="WHIT">	    </span><span class="NAME">params.str</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3666</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">str</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.str</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3667</span> </span><span class="WHIT">            </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">matchResult</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">str.match</span><span class="PUNC">(</span><span class="REGX">/^([^=]+)=(.+)$/</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3668</span> </span><span class="WHIT">            </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">matchResult</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3669</span> </span><span class="WHIT">		</span><span class="NAME">this.sType</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">matchResult</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3670</span> </span><span class="WHIT">		</span><span class="NAME">this.sValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">matchResult</span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3671</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3672</span> </span><span class="WHIT">		</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"malformed attrTypeAndValueStr: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>3673</span> </span><span class="WHIT">				</span><span class="NAME">attrTypeAndValueStr</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3674</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3675</span> </span><span class="WHIT">	    
<span class='line'>3676</span> 	    </span><span class="COMM">//this.setByString(params.str);</span><span class="WHIT">
<span class='line'>3677</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3678</span> </span><span class="WHIT">	    </span><span class="NAME">this.sType</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.type</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3679</span> </span><span class="WHIT">	    </span><span class="NAME">this.sValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.value</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3680</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3681</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3682</span> 
<span class='line'>3683</span> </span><span class="WHIT">    </span><span class="COMM">/*
<span class='line'>3684</span>      * @deprecated
<span class='line'>3685</span>      */</span><span class="WHIT">
<span class='line'>3686</span> </span><span class="WHIT">    </span><span class="NAME">this.setByString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sTypeValue</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sRule</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3687</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">sRule</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.sRule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sRule</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3688</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">matchResult</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sTypeValue.match</span><span class="PUNC">(</span><span class="REGX">/^([^=]+)=(.+)$/</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3689</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">matchResult</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3690</span> </span><span class="WHIT">            </span><span class="NAME">this.setByAttrTypeAndValueStr</span><span class="PUNC">(</span><span class="NAME">matchResult</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">matchResult</span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3691</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3692</span> </span><span class="WHIT">            </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"malformed attrTypeAndValueStr: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>3693</span> </span><span class="WHIT">			    </span><span class="NAME">attrTypeAndValueStr</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3694</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3695</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3696</span> 
<span class='line'>3697</span> </span><span class="WHIT">    </span><span class="NAME">this._getDsType</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3698</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sType</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.sType</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3699</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.sValue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3700</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sRule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.sRule</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3701</span> 
<span class='line'>3702</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">sRule</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"prn"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3703</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">sType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"CN"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">_isMail</span><span class="PUNC">(</span><span class="NAME">sValue</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"ia5"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3704</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">_isPrintable</span><span class="PUNC">(</span><span class="NAME">sValue</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"prn"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3705</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"utf8"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3706</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">sRule</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"utf8"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3707</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">sType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"CN"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">_isMail</span><span class="PUNC">(</span><span class="NAME">sValue</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"ia5"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3708</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">sType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"C"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"prn"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3709</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"utf8"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3710</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3711</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"utf8"</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// default</span><span class="WHIT">
<span class='line'>3712</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3713</span> 
<span class='line'>3714</span> </span><span class="WHIT">    </span><span class="NAME">this.setByAttrTypeAndValueStr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sValue</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sRule</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3715</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">sRule</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.sRule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sRule</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3716</span> </span><span class="WHIT">	</span><span class="NAME">this.sType</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sType</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3717</span> </span><span class="WHIT">	</span><span class="NAME">this.sValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sValue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3718</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3719</span> 
<span class='line'>3720</span> </span><span class="WHIT">    </span><span class="NAME">this.getValueObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">dsType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">valueStr</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3721</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">dsType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"utf8"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERUTF8String</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">"str"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">valueStr</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3722</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">dsType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"prn"</span><span class="PUNC">)</span><span class="WHIT">  </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERPrintableString</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">"str"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">valueStr</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3723</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">dsType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"tel"</span><span class="PUNC">)</span><span class="WHIT">  </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERTeletexString</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">"str"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">valueStr</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3724</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">dsType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"ia5"</span><span class="PUNC">)</span><span class="WHIT">  </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERIA5String</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">"str"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">valueStr</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3725</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">dsType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"vis"</span><span class="PUNC">)</span><span class="WHIT">  </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERVisibleString</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">"str"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">valueStr</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3726</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">dsType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"bmp"</span><span class="PUNC">)</span><span class="WHIT">  </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERBMPString</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">"str"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">valueStr</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3727</span> </span><span class="WHIT">        </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"unsupported directory string type: type="</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>3728</span> </span><span class="WHIT">			</span><span class="NAME">dsType</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" value="</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">valueStr</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3729</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3730</span> 
<span class='line'>3731</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3732</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.dsType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.dsType</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._getDsType</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3733</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1Type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.OID.atype2obj</span><span class="PUNC">(</span><span class="NAME">this.sType</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3734</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1Value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getValueObj</span><span class="PUNC">(</span><span class="NAME">this.dsType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.sValue</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3735</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">"array"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">asn1Type</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">asn1Value</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3736</span> </span><span class="WHIT">        </span><span class="NAME">this.TLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">o.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3737</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.TLV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3738</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3739</span> 
<span class='line'>3740</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3741</span> 
<span class='line'>3742</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3743</span> </span><span class="WHIT">	</span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3744</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3745</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3746</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.AttributeTypeAndValue</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3747</span> 
<span class='line'>3748</span> </span><span class="COMM">// === END   X500Name Related =================================================</span><span class="WHIT">
<span class='line'>3749</span> 
<span class='line'>3750</span> </span><span class="COMM">// === BEGIN Other ASN1 structure class  ======================================</span><span class="WHIT">
<span class='line'>3751</span> 
<span class='line'>3752</span> </span><span class="COMM">/**
<span class='line'>3753</span>  * SubjectPublicKeyInfo ASN.1 structure class
<span class='line'>3754</span>  * @name KJUR.asn1.x509.SubjectPublicKeyInfo
<span class='line'>3755</span>  * @class SubjectPublicKeyInfo ASN.1 structure class
<span class='line'>3756</span>  * @param {Object} params parameter for subject public key
<span class='line'>3757</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>3758</span>  * @description
<span class='line'>3759</span>  * &lt;br/>
<span class='line'>3760</span>  * As for argument 'params' for constructor, you can specify one of
<span class='line'>3761</span>  * following properties:
<span class='line'>3762</span>  * &lt;ul>
<span class='line'>3763</span>  * &lt;li>{@link RSAKey} object&lt;/li>
<span class='line'>3764</span>  * &lt;li>{@link KJUR.crypto.ECDSA} object&lt;/li>
<span class='line'>3765</span>  * &lt;li>{@link KJUR.crypto.DSA} object&lt;/li>
<span class='line'>3766</span>  * &lt;/ul>
<span class='line'>3767</span>  * NOTE1: 'params' can be omitted.&lt;br/>
<span class='line'>3768</span>  * NOTE2: DSA/ECDSA key object is also supported since asn1x509 1.0.6.&lt;br/>
<span class='line'>3769</span>  * &lt;h4>EXAMPLE&lt;/h4>
<span class='line'>3770</span>  * @example
<span class='line'>3771</span>  * spki = new KJUR.asn1.x509.SubjectPublicKeyInfo(RSAKey_object);
<span class='line'>3772</span>  * spki = new KJUR.asn1.x509.SubjectPublicKeyInfo(KJURcryptoECDSA_object);
<span class='line'>3773</span>  * spki = new KJUR.asn1.x509.SubjectPublicKeyInfo(KJURcryptoDSA_object);
<span class='line'>3774</span>  */</span><span class="WHIT">
<span class='line'>3775</span> </span><span class="NAME">KJUR.asn1.x509.SubjectPublicKeyInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3776</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.SubjectPublicKeyInfo.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3777</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1AlgId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3778</span> </span><span class="WHIT">	</span><span class="NAME">asn1SubjPKey</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3779</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3780</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3781</span> </span><span class="WHIT">	</span><span class="NAME">_DERInteger</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERInteger</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3782</span> </span><span class="WHIT">	</span><span class="NAME">_DERBitString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERBitString</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3783</span> </span><span class="WHIT">	</span><span class="NAME">_DERObjectIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERObjectIdentifier</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3784</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3785</span> </span><span class="WHIT">	</span><span class="NAME">_newObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.ASN1Util.newObject</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3786</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3787</span> </span><span class="WHIT">	</span><span class="NAME">_AlgorithmIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.AlgorithmIdentifier</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3788</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_crypto</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.crypto</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3789</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_crypto_ECDSA</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_crypto.ECDSA</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3790</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_crypto_DSA</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_crypto.DSA</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3791</span> 
<span class='line'>3792</span> </span><span class="WHIT">    </span><span class="COMM">/*
<span class='line'>3793</span>      * @since asn1x509 1.0.7
<span class='line'>3794</span>      */</span><span class="WHIT">
<span class='line'>3795</span> </span><span class="WHIT">    </span><span class="NAME">this.getASN1Object</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3796</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.asn1AlgId</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">this.asn1SubjPKey</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>3797</span> </span><span class="WHIT">            </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"algId and/or subjPubKey not set"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3798</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'array'</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>3799</span> </span><span class="WHIT">                                  </span><span class="PUNC">[</span><span class="NAME">this.asn1AlgId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.asn1SubjPKey</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3800</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">o</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3801</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3802</span> 
<span class='line'>3803</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3804</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getASN1Object</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3805</span> </span><span class="WHIT">        </span><span class="NAME">this.hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">o.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3806</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.hTLV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3807</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3808</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3809</span> 
<span class='line'>3810</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>3811</span>      * @name setPubKey
<span class='line'>3812</span>      * @memberOf KJUR.asn1.x509.SubjectPublicKeyInfo#
<span class='line'>3813</span>      * @function
<span class='line'>3814</span>      * @param {Object} {@link RSAKey}, {@link KJUR.crypto.ECDSA} or {@link KJUR.crypto.DSA} object
<span class='line'>3815</span>      * @since jsrsasign 8.0.0 asn1x509 1.1.0
<span class='line'>3816</span>      * @description
<span class='line'>3817</span>      * @example
<span class='line'>3818</span>      * spki = new KJUR.asn1.x509.SubjectPublicKeyInfo();
<span class='line'>3819</span>      * pubKey = KEYUTIL.getKey(PKCS8PUBKEYPEM);
<span class='line'>3820</span>      * spki.setPubKey(pubKey);
<span class='line'>3821</span>      */</span><span class="WHIT">
<span class='line'>3822</span> </span><span class="WHIT">    </span><span class="NAME">this.setPubKey</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">key</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3823</span> </span><span class="WHIT">	</span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3824</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">key</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">RSAKey</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3825</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1RsaPub</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_newObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3826</span> </span><span class="WHIT">		    </span><span class="STRN">'seq'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">{</span><span class="STRN">'int'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">'bigint'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">key.n</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">'int'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">'int'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">key.e</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">]</span><span class="WHIT">
<span class='line'>3827</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3828</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">rsaKeyHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">asn1RsaPub.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3829</span> </span><span class="WHIT">		</span><span class="NAME">this.asn1AlgId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_AlgorithmIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'name'</span><span class="PUNC">:</span><span class="STRN">'rsaEncryption'</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3830</span> </span><span class="WHIT">		</span><span class="NAME">this.asn1SubjPKey</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERBitString</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'hex'</span><span class="PUNC">:</span><span class="STRN">'00'</span><span class="PUNC">+</span><span class="NAME">rsaKeyHex</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3831</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3832</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3833</span> 
<span class='line'>3834</span> </span><span class="WHIT">	</span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3835</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">key</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">KJUR.crypto.ECDSA</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3836</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1Params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERObjectIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'name'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">key.curveName</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3837</span> </span><span class="WHIT">		</span><span class="NAME">this.asn1AlgId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'>3838</span> </span><span class="WHIT">		    </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_AlgorithmIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'name'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'ecPublicKey'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3839</span> </span><span class="WHIT">					      </span><span class="STRN">'asn1params'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">asn1Params</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3840</span> </span><span class="WHIT">		</span><span class="NAME">this.asn1SubjPKey</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERBitString</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'hex'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'00'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">key.pubKeyHex</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3841</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3842</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3843</span> 
<span class='line'>3844</span> </span><span class="WHIT">	</span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3845</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">key</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">KJUR.crypto.DSA</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3846</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1Params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_newObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3847</span> </span><span class="WHIT">		    </span><span class="STRN">'seq'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">{</span><span class="STRN">'int'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">'bigint'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">key.p</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3848</span> </span><span class="WHIT">			    </span><span class="PUNC">{</span><span class="STRN">'int'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">'bigint'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">key.q</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3849</span> </span><span class="WHIT">			    </span><span class="PUNC">{</span><span class="STRN">'int'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">'bigint'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">key.g</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">]</span><span class="WHIT">
<span class='line'>3850</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3851</span> </span><span class="WHIT">		</span><span class="NAME">this.asn1AlgId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'>3852</span> </span><span class="WHIT">		    </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_AlgorithmIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'name'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'dsa'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3853</span> </span><span class="WHIT">					      </span><span class="STRN">'asn1params'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">asn1Params</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3854</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pubInt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERInteger</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'bigint'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">key.y</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3855</span> </span><span class="WHIT">		</span><span class="NAME">this.asn1SubjPKey</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> 
<span class='line'>3856</span> 		    </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERBitString</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'hex'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'00'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">pubInt.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3857</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3858</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3859</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3860</span> 
<span class='line'>3861</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3862</span> </span><span class="WHIT">	</span><span class="NAME">this.setPubKey</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3863</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3864</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3865</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.SubjectPublicKeyInfo</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3866</span> 
<span class='line'>3867</span> </span><span class="COMM">/**
<span class='line'>3868</span>  * Time ASN.1 structure class&lt;br/>
<span class='line'>3869</span>  * @name KJUR.asn1.x509.Time
<span class='line'>3870</span>  * @class Time ASN.1 structure class
<span class='line'>3871</span>  * @param {Array} params associative array of parameters (ex. {'str': '130508235959Z'})
<span class='line'>3872</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>3873</span>  * @see KJUR.asn1.DERUTCTime
<span class='line'>3874</span>  * @see KJUR.asn1.DERGeneralizedTime
<span class='line'>3875</span>  * @description
<span class='line'>3876</span>  * This class represents Time ASN.1 structure defined in 
<span class='line'>3877</span>  * &lt;a href="https://tools.ietf.org/html/rfc5280">RFC 5280&lt;/a>
<span class='line'>3878</span>  * &lt;pre>
<span class='line'>3879</span>  * Time ::= CHOICE {
<span class='line'>3880</span>  *      utcTime        UTCTime,
<span class='line'>3881</span>  *      generalTime    GeneralizedTime }
<span class='line'>3882</span>  * &lt;/pre>
<span class='line'>3883</span>  *
<span class='line'>3884</span>  * @example
<span class='line'>3885</span>  * var t1 = new KJUR.asn1.x509.Time{'str': '130508235959Z'} // UTCTime by default
<span class='line'>3886</span>  * var t2 = new KJUR.asn1.x509.Time{'type': 'gen',  'str': '20130508235959Z'} // GeneralizedTime
<span class='line'>3887</span>  */</span><span class="WHIT">
<span class='line'>3888</span> </span><span class="NAME">KJUR.asn1.x509.Time</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3889</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.Time.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3890</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3891</span> </span><span class="WHIT">	</span><span class="NAME">timeParams</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3892</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3893</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3894</span> </span><span class="WHIT">	</span><span class="NAME">_DERUTCTime</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERUTCTime</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3895</span> </span><span class="WHIT">	</span><span class="NAME">_DERGeneralizedTime</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERGeneralizedTime</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3896</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3897</span> </span><span class="WHIT">    </span><span class="NAME">this.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3898</span> 
<span class='line'>3899</span> </span><span class="WHIT">    </span><span class="COMM">// deprecated</span><span class="WHIT">
<span class='line'>3900</span> </span><span class="WHIT">    </span><span class="NAME">this.setTimeParams</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeParams</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3901</span> </span><span class="WHIT">        </span><span class="NAME">this.timeParams</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">timeParams</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3902</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3903</span> 
<span class='line'>3904</span> </span><span class="WHIT">    </span><span class="NAME">this.setByParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3905</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3906</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3907</span> 
<span class='line'>3908</span> </span><span class="WHIT">    </span><span class="NAME">this.getType</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3909</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">s.match</span><span class="PUNC">(</span><span class="REGX">/^[0-9]{12}Z$/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"utc"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3910</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">s.match</span><span class="PUNC">(</span><span class="REGX">/^[0-9]{14}Z$/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"gen"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3911</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">s.match</span><span class="PUNC">(</span><span class="REGX">/^[0-9]{12}\.[0-9]+Z$/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"utc"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3912</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">s.match</span><span class="PUNC">(</span><span class="REGX">/^[0-9]{14}\.[0-9]+Z$/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"gen"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3913</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3914</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3915</span> 
<span class='line'>3916</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3917</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3918</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3919</span> 
<span class='line'>3920</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">str</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3921</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>3922</span> </span><span class="WHIT">	    </span><span class="NAME">params.str</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> 
<span class='line'>3923</span> 	    </span><span class="PUNC">(</span><span class="NAME">params.type</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">params.type</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3924</span> </span><span class="WHIT">	    </span><span class="NAME">params.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getType</span><span class="PUNC">(</span><span class="NAME">params.str</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3925</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3926</span> 
<span class='line'>3927</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">params.str</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3928</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.type</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"utc"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERUTCTime</span><span class="PUNC">(</span><span class="NAME">params.str</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3929</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.type</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"gen"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERGeneralizedTime</span><span class="PUNC">(</span><span class="NAME">params.str</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3930</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3931</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.type</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"gen"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3932</span> </span><span class="WHIT">		</span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERGeneralizedTime</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3933</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3934</span> </span><span class="WHIT">		</span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERUTCTime</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3935</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3936</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3937</span> 
<span class='line'>3938</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"wrong setting for Time"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3939</span> </span><span class="WHIT">        </span><span class="NAME">this.TLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">o.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3940</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.TLV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3941</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3942</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3943</span> 
<span class='line'>3944</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3945</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3946</span> 
<span class='line'>3947</span> </span><span class="NAME">KJUR.asn1.x509.Time_bak</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3948</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.Time_bak.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3949</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3950</span> </span><span class="WHIT">	</span><span class="NAME">timeParams</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3951</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3952</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3953</span> </span><span class="WHIT">	</span><span class="NAME">_DERUTCTime</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERUTCTime</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3954</span> </span><span class="WHIT">	</span><span class="NAME">_DERGeneralizedTime</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERGeneralizedTime</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3955</span> 
<span class='line'>3956</span> </span><span class="WHIT">    </span><span class="NAME">this.setTimeParams</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeParams</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3957</span> </span><span class="WHIT">        </span><span class="NAME">this.timeParams</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">timeParams</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3958</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3959</span> 
<span class='line'>3960</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3961</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3962</span> 
<span class='line'>3963</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.timeParams</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3964</span> </span><span class="WHIT">            </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.type</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"utc"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3965</span> </span><span class="WHIT">                </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERUTCTime</span><span class="PUNC">(</span><span class="NAME">this.timeParams</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3966</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3967</span> </span><span class="WHIT">                </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERGeneralizedTime</span><span class="PUNC">(</span><span class="NAME">this.timeParams</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3968</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3969</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3970</span> </span><span class="WHIT">            </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.type</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"utc"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3971</span> </span><span class="WHIT">                </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERUTCTime</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3972</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3973</span> </span><span class="WHIT">                </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERGeneralizedTime</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3974</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3975</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3976</span> </span><span class="WHIT">        </span><span class="NAME">this.TLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">o.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3977</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.TLV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3978</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3979</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3980</span> 
<span class='line'>3981</span> </span><span class="WHIT">    </span><span class="NAME">this.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"utc"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3982</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3983</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.type</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3984</span> </span><span class="WHIT">            </span><span class="NAME">this.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.type</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3985</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3986</span> </span><span class="WHIT">            </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.str</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3987</span> </span><span class="WHIT">                </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.str.match</span><span class="PUNC">(</span><span class="REGX">/^[0-9]{12}Z$/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"utc"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3988</span> </span><span class="WHIT">                </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.str.match</span><span class="PUNC">(</span><span class="REGX">/^[0-9]{14}Z$/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"gen"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3989</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3990</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3991</span> </span><span class="WHIT">        </span><span class="NAME">this.timeParams</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3992</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3993</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3994</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.Time</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3995</span> 
<span class='line'>3996</span> </span><span class="COMM">/**
<span class='line'>3997</span>  * AlgorithmIdentifier ASN.1 structure class
<span class='line'>3998</span>  * @name KJUR.asn1.x509.AlgorithmIdentifier
<span class='line'>3999</span>  * @class AlgorithmIdentifier ASN.1 structure class
<span class='line'>4000</span>  * @param {Array} params associative array of parameters (ex. {'name': 'SHA1withRSA'})
<span class='line'>4001</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>4002</span>  * @description
<span class='line'>4003</span>  * The 'params' argument is an associative array and has following parameters:
<span class='line'>4004</span>  * &lt;ul>
<span class='line'>4005</span>  * &lt;li>name: algorithm name (MANDATORY, ex. sha1, SHA256withRSA)&lt;/li>
<span class='line'>4006</span>  * &lt;li>asn1params: explicitly specify ASN.1 object for algorithm.
<span class='line'>4007</span>  * (OPTION)&lt;/li>
<span class='line'>4008</span>  * &lt;li>paramempty: set algorithm parameter to NULL by force.
<span class='line'>4009</span>  * If paramempty is false, algorithm parameter will be set automatically.
<span class='line'>4010</span>  * If paramempty is false and algorithm name is "*withDSA" or "withECDSA" parameter field of
<span class='line'>4011</span>  * AlgorithmIdentifier will be ommitted otherwise
<span class='line'>4012</span>  * it will be NULL by default.
<span class='line'>4013</span>  * (OPTION, DEFAULT = false)&lt;/li>
<span class='line'>4014</span>  * &lt;/ul>
<span class='line'>4015</span>  * RSA-PSS algorithm names such as SHA{,256,384,512}withRSAandMGF1 are
<span class='line'>4016</span>  * special names. They will set a suite of algorithm OID and multiple algorithm
<span class='line'>4017</span>  * parameters. Its ASN.1 schema is defined in 
<span class='line'>4018</span>  * &lt;a href="https://tools.ietf.org/html/rfc3447#appendix-A.2.3">RFC 3447 PKCS#1 2.1
<span class='line'>4019</span>  * section A.2.3&lt;/a>.
<span class='line'>4020</span>  * &lt;blockquote>&lt;pre>
<span class='line'>4021</span>  * id-RSASSA-PSS  OBJECT IDENTIFIER ::= { pkcs-1 10 }
<span class='line'>4022</span>  * RSASSA-PSS-params ::= SEQUENCE {
<span class='line'>4023</span>  *   hashAlgorithm      [0] HashAlgorithm    DEFAULT sha1,
<span class='line'>4024</span>  *   maskGenAlgorithm   [1] MaskGenAlgorithm DEFAULT mgf1SHA1,
<span class='line'>4025</span>  *   saltLength         [2] INTEGER          DEFAULT 20,
<span class='line'>4026</span>  *   trailerField       [3] TrailerField     DEFAULT trailerFieldBC }
<span class='line'>4027</span>  * mgf1SHA1    MaskGenAlgorithm ::= {
<span class='line'>4028</span>  *   algorithm   id-mgf1,
<span class='line'>4029</span>  *   parameters  HashAlgorithm : sha1 }
<span class='line'>4030</span>  * id-mgf1     OBJECT IDENTIFIER ::= { pkcs-1 8 }
<span class='line'>4031</span>  * TrailerField ::= INTEGER { trailerFieldBC(1) }
<span class='line'>4032</span>  * &lt;/pre>&lt;/blockquote>
<span class='line'>4033</span>  * Here is a table for PSS parameters:
<span class='line'>4034</span>  * &lt;table>
<span class='line'>4035</span>  * &lt;tr>&lt;th>Name&lt;/th>&lt;th>alg oid&lt;/th>&lt;th>pss hash&lt;/th>&lt;th>maskgen&lt;/th>&lt;/th>&lt;th>pss saltlen&lt;/th>&lt;th>trailer&lt;/th>&lt;/tr>
<span class='line'>4036</span>  * &lt;tr>&lt;td>SHAwithRSAandMGF1&lt;/td>&lt;td>1.2.840.113549.1.1.10(rsapss)&lt;/td>&lt;td>default(sha1)&lt;/td>&lt;td>default(mgf1sha1)&lt;/td>&lt;td>default(20)&lt;/td>&lt;td>default(1)&lt;/td>&lt;/tr>
<span class='line'>4037</span>  * &lt;tr>&lt;td>SHA256withRSAandMGF1&lt;/td>&lt;td>1.2.840.113549.1.1.10(rsapss)&lt;/td>&lt;td>sha256&lt;/td>&lt;td>mgf1sha256&lt;/td>&lt;td>32&lt;/td>&lt;td>default(1)&lt;/td>&lt;/tr>
<span class='line'>4038</span>  * &lt;tr>&lt;td>SHA384withRSAandMGF1&lt;/td>&lt;td>1.2.840.113549.1.1.10(rsapss)&lt;/td>&lt;td>sha384&lt;/td>&lt;td>mgf1sha384&lt;/td>&lt;td>48&lt;/td>&lt;td>default(1)&lt;/td>&lt;/tr>
<span class='line'>4039</span>  * &lt;tr>&lt;td>SHA512withRSAandMGF1&lt;/td>&lt;td>1.2.840.113549.1.1.10(rsapss)&lt;/td>&lt;td>sha512&lt;/td>&lt;td>mgf1sha512&lt;/td>&lt;td>64&lt;/td>&lt;td>default(1)&lt;/td>&lt;/tr>
<span class='line'>4040</span>  * &lt;/table>
<span class='line'>4041</span>  * Default value is omitted as defined in ASN.1 schema.
<span class='line'>4042</span>  * These parameters are interoperable to OpenSSL or IAIK toolkit.
<span class='line'>4043</span>  * &lt;br/>
<span class='line'>4044</span>  * NOTE: RSA-PSS algorihtm names are supported since jsrsasign 8.0.21. 
<span class='line'>4045</span>  * @example
<span class='line'>4046</span>  * new KJUR.asn1.x509.AlgorithmIdentifier({name: "sha1"})
<span class='line'>4047</span>  * new KJUR.asn1.x509.AlgorithmIdentifier({name: "SHA256withRSA"})
<span class='line'>4048</span>  * new KJUR.asn1.x509.AlgorithmIdentifier({name: "SHA512withRSAandMGF1"}) // set parameters automatically
<span class='line'>4049</span>  * new KJUR.asn1.x509.AlgorithmIdentifier({name: "SHA256withRSA", paramempty: true})
<span class='line'>4050</span>  * new KJUR.asn1.x509.AlgorithmIdentifier({name: "rsaEncryption"})
<span class='line'>4051</span>  */</span><span class="WHIT">
<span class='line'>4052</span> </span><span class="NAME">KJUR.asn1.x509.AlgorithmIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4053</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.AlgorithmIdentifier.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4054</span> </span><span class="WHIT">    </span><span class="NAME">this.nameAlg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4055</span> </span><span class="WHIT">    </span><span class="NAME">this.asn1Alg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4056</span> </span><span class="WHIT">    </span><span class="NAME">this.asn1Params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4057</span> </span><span class="WHIT">    </span><span class="NAME">this.paramEmpty</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4058</span> 
<span class='line'>4059</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4060</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4061</span> </span><span class="WHIT">	</span><span class="NAME">_PSSNAME2ASN1TLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4062</span> 
<span class='line'>4063</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4064</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.nameAlg</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this.asn1Alg</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4065</span> </span><span class="WHIT">            </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"algorithm not specified"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4066</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4067</span> 
<span class='line'>4068</span> </span><span class="WHIT">	</span><span class="COMM">// for RSAPSS algorithm name</span><span class="WHIT">
<span class='line'>4069</span> </span><span class="WHIT">	</span><span class="COMM">//  && this.hTLV === null</span><span class="WHIT">
<span class='line'>4070</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.nameAlg</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4071</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4072</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">_PSSNAME2ASN1TLV</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4073</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">this.nameAlg</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4074</span> </span><span class="WHIT">		    </span><span class="NAME">hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_PSSNAME2ASN1TLV</span><span class="PUNC">[</span><span class="NAME">key</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4075</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4076</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4077</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hTLV</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4078</span> </span><span class="WHIT">		</span><span class="NAME">this.hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hTLV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4079</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.hTLV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4080</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4081</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4082</span> 
<span class='line'>4083</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.nameAlg</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this.asn1Alg</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4084</span> </span><span class="WHIT">            </span><span class="NAME">this.asn1Alg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509.OID.name2obj</span><span class="PUNC">(</span><span class="NAME">this.nameAlg</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4085</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4086</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">this.asn1Alg</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4087</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.asn1Params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">this.asn1Params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4088</span> 
<span class='line'>4089</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'array'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4090</span> </span><span class="WHIT">        </span><span class="NAME">this.hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">o.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4091</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.hTLV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4092</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4093</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4094</span> 
<span class='line'>4095</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4096</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.name</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4097</span> </span><span class="WHIT">            </span><span class="NAME">this.nameAlg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.name</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4098</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4099</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.asn1params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4100</span> </span><span class="WHIT">            </span><span class="NAME">this.asn1Params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.asn1params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4101</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4102</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.paramempty</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4103</span> </span><span class="WHIT">            </span><span class="NAME">this.paramEmpty</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.paramempty</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4104</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4105</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4106</span> 
<span class='line'>4107</span> </span><span class="WHIT">    </span><span class="COMM">// set algorithm parameters will be ommitted for</span><span class="WHIT">
<span class='line'>4108</span> </span><span class="WHIT">    </span><span class="COMM">// "*withDSA" or "*withECDSA" otherwise will be NULL.</span><span class="WHIT">
<span class='line'>4109</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.asn1Params</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>4110</span> </span><span class="WHIT">	</span><span class="NAME">this.paramEmpty</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>4111</span> </span><span class="WHIT">	</span><span class="NAME">this.nameAlg</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4112</span> 
<span class='line'>4113</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.nameAlg.name</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4114</span> </span><span class="WHIT">	    </span><span class="NAME">this.nameAlg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.nameAlg.name</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4115</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4116</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">lcNameAlg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.nameAlg.toLowerCase</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4117</span> 
<span class='line'>4118</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">lcNameAlg.substr</span><span class="PUNC">(</span><span class="PUNC">-</span><span class="NUMB">7</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">7</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="STRN">"withdsa"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>4119</span> </span><span class="WHIT">	    </span><span class="NAME">lcNameAlg.substr</span><span class="PUNC">(</span><span class="PUNC">-</span><span class="NUMB">9</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">9</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="STRN">"withecdsa"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4120</span> </span><span class="WHIT">            </span><span class="NAME">this.asn1Params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERNull</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4121</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4122</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4123</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4124</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.AlgorithmIdentifier</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4125</span> 
<span class='line'>4126</span> </span><span class="COMM">/**
<span class='line'>4127</span>  * AlgorithmIdentifier ASN.1 TLV string associative array for RSA-PSS algorithm names
<span class='line'>4128</span>  * @const
<span class='line'>4129</span>  */</span><span class="WHIT">
<span class='line'>4130</span> </span><span class="NAME">KJUR.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4131</span> </span><span class="WHIT">    </span><span class="STRN">"SHAwithRSAandMGF1"</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>4132</span> </span><span class="WHIT">    </span><span class="STRN">"300d06092a864886f70d01010a3000"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4133</span> </span><span class="WHIT">    </span><span class="STRN">"SHA256withRSAandMGF1"</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>4134</span> </span><span class="WHIT">    </span><span class="STRN">"303d06092a864886f70d01010a3030a00d300b0609608648016503040201a11a301806092a864886f70d010108300b0609608648016503040201a203020120"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4135</span> </span><span class="WHIT">    </span><span class="STRN">"SHA384withRSAandMGF1"</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>4136</span> </span><span class="WHIT">    </span><span class="STRN">"303d06092a864886f70d01010a3030a00d300b0609608648016503040202a11a301806092a864886f70d010108300b0609608648016503040202a203020130"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4137</span> </span><span class="WHIT">    </span><span class="STRN">"SHA512withRSAandMGF1"</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>4138</span> </span><span class="WHIT">    </span><span class="STRN">"303d06092a864886f70d01010a3030a00d300b0609608648016503040203a11a301806092a864886f70d010108300b0609608648016503040203a203020140"</span><span class="WHIT">
<span class='line'>4139</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4140</span> 
<span class='line'>4141</span> </span><span class="COMM">/**
<span class='line'>4142</span>  * GeneralName ASN.1 structure class&lt;br/>
<span class='line'>4143</span>  * @name KJUR.asn1.x509.GeneralName
<span class='line'>4144</span>  * @class GeneralName ASN.1 structure class
<span class='line'>4145</span>  * @see KJUR.asn1.x509.OtherName
<span class='line'>4146</span>  * @see KJUR.asn1.x509.X500Name
<span class='line'>4147</span>  *
<span class='line'>4148</span>  * @description
<span class='line'>4149</span>  * &lt;br/>
<span class='line'>4150</span>  * As for argument 'params' for constructor, you can specify one of
<span class='line'>4151</span>  * following properties:
<span class='line'>4152</span>  * &lt;ul>
<span class='line'>4153</span>  * &lt;li>rfc822 - rfc822Name[1] (ex. user1@foo.com)&lt;/li>
<span class='line'>4154</span>  * &lt;li>dns - dNSName[2] (ex. foo.com)&lt;/li>
<span class='line'>4155</span>  * &lt;li>uri - uniformResourceIdentifier[6] (ex. http://foo.com/)&lt;/li>
<span class='line'>4156</span>  * &lt;li>dn - directoryName[4] 
<span class='line'>4157</span>  * distinguished name string or X500Name class parameters can be
<span class='line'>4158</span>  * specified (ex. "/C=US/O=Test", {hex: '301c...')&lt;/li>
<span class='line'>4159</span>  * &lt;li>ldapdn - directoryName[4] (ex. O=Test,C=US)&lt;/li>
<span class='line'>4160</span>  * &lt;li>certissuer - directoryName[4] (PEM or hex string of cert)&lt;/li>
<span class='line'>4161</span>  * &lt;li>certsubj - directoryName[4] (PEM or hex string of cert)&lt;/li>
<span class='line'>4162</span>  * &lt;li>ip - iPAddress[7] (ex. 192.168.1.1, 2001:db3::43, 3faa0101...)&lt;/li>
<span class='line'>4163</span>  * &lt;/ul>
<span class='line'>4164</span>  * NOTE1: certissuer and certsubj were supported since asn1x509 1.0.10.&lt;br/>
<span class='line'>4165</span>  * NOTE2: dn and ldapdn were supported since jsrsasign 6.2.3 asn1x509 1.0.19.&lt;br/>
<span class='line'>4166</span>  * NOTE3: ip were supported since jsrsasign 8.0.10 asn1x509 1.1.4.&lt;br/>
<span class='line'>4167</span>  * NOTE4: X500Name parameters in dn were supported since jsrsasign 8.0.16.&lt;br/>
<span class='line'>4168</span>  * NOTE5: otherName is supported since jsrsasign 10.5.3.&lt;br/>
<span class='line'>4169</span>  *
<span class='line'>4170</span>  * Here is definition of the ASN.1 syntax:
<span class='line'>4171</span>  * &lt;pre>
<span class='line'>4172</span>  * -- NOTE: under the CHOICE, it will always be explicit.
<span class='line'>4173</span>  * GeneralName ::= CHOICE {
<span class='line'>4174</span>  *   otherName                  [0] OtherName,
<span class='line'>4175</span>  *   rfc822Name                 [1] IA5String,
<span class='line'>4176</span>  *   dNSName                    [2] IA5String,
<span class='line'>4177</span>  *   x400Address                [3] ORAddress,
<span class='line'>4178</span>  *   directoryName              [4] Name,
<span class='line'>4179</span>  *   ediPartyName               [5] EDIPartyName,
<span class='line'>4180</span>  *   uniformResourceIdentifier  [6] IA5String,
<span class='line'>4181</span>  *   iPAddress                  [7] OCTET STRING,
<span class='line'>4182</span>  *   registeredID               [8] OBJECT IDENTIFIER }
<span class='line'>4183</span>  *
<span class='line'>4184</span>  * OtherName ::= SEQUENCE {
<span class='line'>4185</span>  *   type-id    OBJECT IDENTIFIER,
<span class='line'>4186</span>  *   value      [0] EXPLICIT ANY DEFINED BY type-id }
<span class='line'>4187</span>  * &lt;/pre>
<span class='line'>4188</span>  *
<span class='line'>4189</span>  * @example
<span class='line'>4190</span>  * gn = new KJUR.asn1.x509.GeneralName({dn:     '/C=US/O=Test'});
<span class='line'>4191</span>  * gn = new KJUR.asn1.x509.GeneralName({dn:     X500NameObject);
<span class='line'>4192</span>  * gn = new KJUR.asn1.x509.GeneralName({dn:     {str: /C=US/O=Test'});
<span class='line'>4193</span>  * gn = new KJUR.asn1.x509.GeneralName({dn:     {ldapstr: 'O=Test,C=US'});
<span class='line'>4194</span>  * gn = new KJUR.asn1.x509.GeneralName({dn:     {hex: '301c...'});
<span class='line'>4195</span>  * gn = new KJUR.asn1.x509.GeneralName({dn:     {certissuer: PEMCERTSTRING});
<span class='line'>4196</span>  * gn = new KJUR.asn1.x509.GeneralName({dn:     {certsubject: PEMCERTSTRING});
<span class='line'>4197</span>  * gn = new KJUR.asn1.x509.GeneralName({ip:     '192.168.1.1'});
<span class='line'>4198</span>  * gn = new KJUR.asn1.x509.GeneralName({ip:     '2001:db4::4:1'});
<span class='line'>4199</span>  * gn = new KJUR.asn1.x509.GeneralName({ip:     'c0a80101'});
<span class='line'>4200</span>  * gn = new KJUR.asn1.x509.GeneralName({rfc822: 'test@aaa.com'});
<span class='line'>4201</span>  * gn = new KJUR.asn1.x509.GeneralName({dns:    'aaa.com'});
<span class='line'>4202</span>  * gn = new KJUR.asn1.x509.GeneralName({uri:    'http://aaa.com/'});
<span class='line'>4203</span>  * gn = new KJUR.asn1.x509.GeneralName({other: {
<span class='line'>4204</span>  *   oid: "1.2.3.4",
<span class='line'>4205</span>  *   value: {utf8str: "example"} // any ASN.1 which passed to ASN1Util.newObject
<span class='line'>4206</span>  * }});
<span class='line'>4207</span>  *
<span class='line'>4208</span>  * gn = new KJUR.asn1.x509.GeneralName({ldapdn:     'O=Test,C=US'}); // DEPRECATED
<span class='line'>4209</span>  * gn = new KJUR.asn1.x509.GeneralName({certissuer: certPEM});       // DEPRECATED
<span class='line'>4210</span>  * gn = new KJUR.asn1.x509.GeneralName({certsubj:   certPEM});       // DEPRECATED
<span class='line'>4211</span>  */</span><span class="WHIT">
<span class='line'>4212</span> </span><span class="NAME">KJUR.asn1.x509.GeneralName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4213</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.GeneralName.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4214</span> 
<span class='line'>4215</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pTag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">rfc822</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'81'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dns</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'82'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dn</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'a4'</span><span class="PUNC">,</span><span class="WHIT">  
<span class='line'>4216</span> 		 </span><span class="NAME">uri</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'86'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">ip</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'87'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">otherName</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'a0'</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4217</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4218</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4219</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4220</span> </span><span class="WHIT">	</span><span class="NAME">_X500Name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.X500Name</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4221</span> </span><span class="WHIT">	</span><span class="NAME">_OtherName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.OtherName</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4222</span> </span><span class="WHIT">	</span><span class="NAME">_DERIA5String</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERIA5String</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4223</span> </span><span class="WHIT">	</span><span class="NAME">_DERPrintableString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERPrintableString</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4224</span> </span><span class="WHIT">	</span><span class="NAME">_DEROctetString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DEROctetString</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4225</span> </span><span class="WHIT">	</span><span class="NAME">_DERTaggedObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERTaggedObject</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4226</span> </span><span class="WHIT">	</span><span class="NAME">_ASN1Object</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.ASN1Object</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4227</span> </span><span class="WHIT">	</span><span class="NAME">_Error</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4228</span> 
<span class='line'>4229</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4230</span> 
<span class='line'>4231</span> </span><span class="WHIT">    </span><span class="NAME">this.setByParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4232</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4233</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4234</span> 
<span class='line'>4235</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4236</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4237</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hTag</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">explicitFlag</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dObj</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4238</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">explicitFlag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4239</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.other</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4240</span> </span><span class="WHIT">	    </span><span class="NAME">hTag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"a0"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4241</span> </span><span class="WHIT">	    </span><span class="NAME">dObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_OtherName</span><span class="PUNC">(</span><span class="NAME">params.other</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4242</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.rfc822</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4243</span> </span><span class="WHIT">	    </span><span class="NAME">hTag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"81"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4244</span> </span><span class="WHIT">	    </span><span class="NAME">dObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERIA5String</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">str</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.rfc822</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4245</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.dns</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4246</span> </span><span class="WHIT">	    </span><span class="NAME">hTag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"82"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4247</span> </span><span class="WHIT">	    </span><span class="NAME">dObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERIA5String</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">str</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.dns</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4248</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.dn</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4249</span> </span><span class="WHIT">	    </span><span class="NAME">hTag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"a4"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4250</span> </span><span class="WHIT">	    </span><span class="NAME">explicitFlag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4251</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params.dn</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4252</span> </span><span class="WHIT">		</span><span class="NAME">dObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_X500Name</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">str</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.dn</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4253</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.dn</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.X500Name</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4254</span> </span><span class="WHIT">		</span><span class="NAME">dObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.dn</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4255</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4256</span> </span><span class="WHIT">		</span><span class="NAME">dObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_X500Name</span><span class="PUNC">(</span><span class="NAME">params.dn</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4257</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4258</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.ldapdn</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4259</span> </span><span class="WHIT">	    </span><span class="NAME">hTag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"a4"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4260</span> </span><span class="WHIT">	    </span><span class="NAME">explicitFlag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4261</span> </span><span class="WHIT">	    </span><span class="NAME">dObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_X500Name</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">ldapstr</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.ldapdn</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4262</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.certissuer</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>4263</span> </span><span class="WHIT">		   </span><span class="NAME">params.certsubj</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4264</span> </span><span class="WHIT">	    </span><span class="NAME">hTag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"a4"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4265</span> </span><span class="WHIT">	    </span><span class="NAME">explicitFlag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4266</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">isIssuer</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">certStr</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4267</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">certHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4268</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.certsubj</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4269</span> </span><span class="WHIT">		</span><span class="NAME">isIssuer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4270</span> </span><span class="WHIT">		</span><span class="NAME">certStr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.certsubj</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4271</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4272</span> </span><span class="WHIT">		</span><span class="NAME">isIssuer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4273</span> </span><span class="WHIT">		</span><span class="NAME">certStr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.certissuer</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4274</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4275</span> 
<span class='line'>4276</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">certStr.match</span><span class="PUNC">(</span><span class="REGX">/^[0-9A-Fa-f]+$/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4277</span> </span><span class="WHIT">		</span><span class="NAME">certHex</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">certStr</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4278</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4279</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">certStr.indexOf</span><span class="PUNC">(</span><span class="STRN">"-----BEGIN "</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4280</span> </span><span class="WHIT">		</span><span class="NAME">certHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pemtohex</span><span class="PUNC">(</span><span class="NAME">certStr</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4281</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4282</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">certHex</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> 
<span class='line'>4283</span> 		</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"certsubj/certissuer not cert"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4284</span> 
<span class='line'>4285</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">X509</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4286</span> </span><span class="WHIT">	    </span><span class="NAME">x.hex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">certHex</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4287</span> 
<span class='line'>4288</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hDN</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4289</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">isIssuer</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4290</span> </span><span class="WHIT">		</span><span class="NAME">hDN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">x.getIssuerHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4291</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4292</span> </span><span class="WHIT">		</span><span class="NAME">hDN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">x.getSubjectHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4293</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4294</span> </span><span class="WHIT">	    </span><span class="NAME">dObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_ASN1Object</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4295</span> </span><span class="WHIT">	    </span><span class="NAME">dObj.hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hDN</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4296</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.uri</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4297</span> </span><span class="WHIT">	    </span><span class="NAME">hTag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"86"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4298</span> </span><span class="WHIT">	    </span><span class="NAME">dObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERIA5String</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">str</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.uri</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4299</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.ip</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4300</span> </span><span class="WHIT">	    </span><span class="NAME">hTag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"87"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4301</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hIP</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4302</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">ip</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.ip</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4303</span> </span><span class="WHIT">	    </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4304</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">ip.match</span><span class="PUNC">(</span><span class="REGX">/^[0-9a-f]+$/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4305</span> </span><span class="WHIT">		    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">len</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">ip.length</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4306</span> </span><span class="WHIT">		    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">len</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">8</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">len</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">16</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">len</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">32</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">len</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">64</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4307</span> </span><span class="WHIT">			</span><span class="NAME">hIP</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">ip</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4308</span> </span><span class="WHIT">		    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4309</span> </span><span class="WHIT">			</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"err"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4310</span> </span><span class="WHIT">		    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4311</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4312</span> </span><span class="WHIT">		    </span><span class="NAME">hIP</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">iptohex</span><span class="PUNC">(</span><span class="NAME">ip</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4313</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4314</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4315</span> </span><span class="WHIT">		</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="PUNC">(</span><span class="STRN">"malformed IP address: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">params.ip</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">":"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">ex.message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4316</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4317</span> </span><span class="WHIT">	    </span><span class="NAME">dObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DEROctetString</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">hex</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">hIP</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4318</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4319</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="PUNC">(</span><span class="STRN">"improper params"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4320</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4321</span> 
<span class='line'>4322</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dTag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERTaggedObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">tag</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">hTag</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4323</span> </span><span class="WHIT">					 </span><span class="NAME">explicit</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">explicitFlag</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4324</span> </span><span class="WHIT">					 </span><span class="NAME">obj</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">dObj</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4325</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">dTag.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4326</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4327</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4328</span> 
<span class='line'>4329</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4330</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4331</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.GeneralName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4332</span> 
<span class='line'>4333</span> </span><span class="COMM">/**
<span class='line'>4334</span>  * GeneralNames ASN.1 structure class&lt;br/>
<span class='line'>4335</span>  * @name KJUR.asn1.x509.GeneralNames
<span class='line'>4336</span>  * @class GeneralNames ASN.1 structure class
<span class='line'>4337</span>  * @description
<span class='line'>4338</span>  * &lt;br/>
<span class='line'>4339</span>  * &lt;h4>EXAMPLE AND ASN.1 SYNTAX&lt;/h4>
<span class='line'>4340</span>  * @example
<span class='line'>4341</span>  * gns = new KJUR.asn1.x509.GeneralNames([{'uri': 'http://aaa.com/'}, {'uri': 'http://bbb.com/'}]);
<span class='line'>4342</span>  *
<span class='line'>4343</span>  * GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
<span class='line'>4344</span>  */</span><span class="WHIT">
<span class='line'>4345</span> </span><span class="NAME">KJUR.asn1.x509.GeneralNames</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">paramsArray</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4346</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.GeneralNames.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4347</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1Array</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4348</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4349</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4350</span> 
<span class='line'>4351</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>4352</span>      * set a array of {@link KJUR.asn1.x509.GeneralName} parameters&lt;br/>
<span class='line'>4353</span>      * @name setByParamArray
<span class='line'>4354</span>      * @memberOf KJUR.asn1.x509.GeneralNames#
<span class='line'>4355</span>      * @function
<span class='line'>4356</span>      * @param {Array} paramsArray Array of {@link KJUR.asn1.x509.GeneralNames}
<span class='line'>4357</span>      * @description
<span class='line'>4358</span>      * &lt;br/>
<span class='line'>4359</span>      * &lt;h4>EXAMPLES&lt;/h4>
<span class='line'>4360</span>      * @example
<span class='line'>4361</span>      * gns = new KJUR.asn1.x509.GeneralNames();
<span class='line'>4362</span>      * gns.setByParamArray([{uri: 'http://aaa.com/'}, {uri: 'http://bbb.com/'}]);
<span class='line'>4363</span>      */</span><span class="WHIT">
<span class='line'>4364</span> </span><span class="WHIT">    </span><span class="NAME">this.setByParamArray</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">paramsArray</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4365</span> </span><span class="WHIT">        </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">paramsArray.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4366</span> </span><span class="WHIT">            </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509.GeneralName</span><span class="PUNC">(</span><span class="NAME">paramsArray</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4367</span> </span><span class="WHIT">            </span><span class="NAME">this.asn1Array.push</span><span class="PUNC">(</span><span class="NAME">o</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4368</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4369</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4370</span> 
<span class='line'>4371</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4372</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'array'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.asn1Array</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4373</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">o.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4374</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4375</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4376</span> 
<span class='line'>4377</span> </span><span class="WHIT">    </span><span class="NAME">this.asn1Array</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Array</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4378</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">paramsArray</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4379</span> </span><span class="WHIT">        </span><span class="NAME">this.setByParamArray</span><span class="PUNC">(</span><span class="NAME">paramsArray</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4380</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4381</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4382</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.GeneralNames</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4383</span> 
<span class='line'>4384</span> </span><span class="COMM">/**
<span class='line'>4385</span>  * OtherName of GeneralName ASN.1 structure class&lt;br/>
<span class='line'>4386</span>  * @name KJUR.asn1.x509.OtherName
<span class='line'>4387</span>  * @class OtherName ASN.1 structure class
<span class='line'>4388</span>  * @since jsrsasign 10.5.3 asn1x509 2.1.12
<span class='line'>4389</span>  * @see KJUR.asn1.x509.GeneralName
<span class='line'>4390</span>  * @see KJUR.asn1.ASN1Util.newObject
<span class='line'>4391</span>  *
<span class='line'>4392</span>  * @description
<span class='line'>4393</span>  * This class is for OtherName of GeneralName ASN.1 structure.
<span class='line'>4394</span>  * Constructor has two members:
<span class='line'>4395</span>  * &lt;ul>
<span class='line'>4396</span>  * &lt;li>oid - oid string (ex. "1.2.3.4")&lt;/li>
<span class='line'>4397</span>  * &lt;li>value - JSON object passed to ASN1Util.newObject or ASN1Object object&lt;/li>
<span class='line'>4398</span>  * &lt;/ul>
<span class='line'>4399</span>  *
<span class='line'>4400</span>  * &lt;pre>
<span class='line'>4401</span>  * OtherName ::= SEQUENCE {
<span class='line'>4402</span>  *   type-id    OBJECT IDENTIFIER,
<span class='line'>4403</span>  *   value      [0] EXPLICIT ANY DEFINED BY type-id }
<span class='line'>4404</span>  * &lt;/pre>
<span class='line'>4405</span>  *
<span class='line'>4406</span>  * @example
<span class='line'>4407</span>  * new KJUR.asn1.x509.OtherName({
<span class='line'>4408</span>  *   oid: "1.2.3.4",
<span class='line'>4409</span>  *   value: {prnstr: {str: "abc"}}
<span class='line'>4410</span>  * })
<span class='line'>4411</span>  */</span><span class="WHIT">
<span class='line'>4412</span> </span><span class="NAME">KJUR.asn1.x509.OtherName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4413</span> </span><span class="WHIT">    </span><span class="NAME">KJUR.asn1.x509.OtherName.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4414</span> 
<span class='line'>4415</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">asn1Obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4416</span> </span><span class="WHIT">	</span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4417</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4418</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4419</span> </span><span class="WHIT">	</span><span class="NAME">_DERObjectIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERObjectIdentifier</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4420</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4421</span> </span><span class="WHIT">	</span><span class="NAME">_newObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.ASN1Util.newObject</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4422</span> 
<span class='line'>4423</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4424</span> 
<span class='line'>4425</span> </span><span class="WHIT">    </span><span class="NAME">this.setByParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4426</span> </span><span class="WHIT">	</span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4427</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4428</span> 
<span class='line'>4429</span> </span><span class="WHIT">    </span><span class="NAME">this.tohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4430</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4431</span> 
<span class='line'>4432</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">params.value</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>4433</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"oid or value not specified"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4434</span> 
<span class='line'>4435</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dOid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERObjectIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">oid</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.oid</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4436</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_newObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">tag</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">tag</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"a0"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4437</span> </span><span class="WHIT">				       </span><span class="NAME">explicit</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4438</span> </span><span class="WHIT">				       </span><span class="NAME">obj</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.value</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4439</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dSeq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">dOid</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dValue</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4440</span> 
<span class='line'>4441</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">dSeq.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4442</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4443</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4444</span> 
<span class='line'>4445</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4446</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4447</span> </span><span class="NAME">extendClass</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.x509.OtherName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4448</span> 
<span class='line'>4449</span> </span><span class="COMM">/**
<span class='line'>4450</span>  * static object for OID
<span class='line'>4451</span>  * @name KJUR.asn1.x509.OID
<span class='line'>4452</span>  * @class static object for OID
<span class='line'>4453</span>  * @property {Assoc Array} atype2oidList for short attribute type name and oid (ex. 'C' and '2.5.4.6')
<span class='line'>4454</span>  * @property {Assoc Array} name2oidList for oid name and oid (ex. 'keyUsage' and '2.5.29.15')
<span class='line'>4455</span>  * @property {Assoc Array} objCache for caching name and DERObjectIdentifier object
<span class='line'>4456</span>  *
<span class='line'>4457</span>  * @description
<span class='line'>4458</span>  * This class defines OID name and values.
<span class='line'>4459</span>  * AttributeType names registered in OID.atype2oidList are following:
<span class='line'>4460</span>  * &lt;table style="border-width: thin; border-style: solid; witdh: 100%">
<span class='line'>4461</span>  * &lt;tr>&lt;th>short&lt;/th>&lt;th>long&lt;/th>&lt;th>OID&lt;/th>&lt;/tr>
<span class='line'>4462</span>  * &lt;tr>&lt;td>CN&lt;/td>commonName&lt;td>&lt;/td>&lt;td>2.5.4.3&lt;/td>&lt;/tr>
<span class='line'>4463</span>  * &lt;tr>&lt;td>L&lt;/td>&lt;td>localityName&lt;/td>&lt;td>2.5.4.7&lt;/td>&lt;/tr>
<span class='line'>4464</span>  * &lt;tr>&lt;td>ST&lt;/td>&lt;td>stateOrProvinceName&lt;/td>&lt;td>2.5.4.8&lt;/td>&lt;/tr>
<span class='line'>4465</span>  * &lt;tr>&lt;td>O&lt;/td>&lt;td>organizationName&lt;/td>&lt;td>2.5.4.10&lt;/td>&lt;/tr>
<span class='line'>4466</span>  * &lt;tr>&lt;td>OU&lt;/td>&lt;td>organizationalUnitName&lt;/td>&lt;td>2.5.4.11&lt;/td>&lt;/tr>
<span class='line'>4467</span>  * &lt;tr>&lt;td>C&lt;/td>&lt;td>&lt;/td>countryName&lt;td>2.5.4.6&lt;/td>&lt;/tr>
<span class='line'>4468</span>  * &lt;tr>&lt;td>STREET&lt;/td>streetAddress&lt;td>&lt;/td>&lt;td>2.5.4.6&lt;/td>&lt;/tr>
<span class='line'>4469</span>  * &lt;tr>&lt;td>DC&lt;/td>&lt;td>domainComponent&lt;/td>&lt;td>0.9.2342.19200300.100.1.25&lt;/td>&lt;/tr>
<span class='line'>4470</span>  * &lt;tr>&lt;td>UID&lt;/td>&lt;td>userId&lt;/td>&lt;td>0.9.2342.19200300.100.1.1&lt;/td>&lt;/tr>
<span class='line'>4471</span>  * &lt;tr>&lt;td>SN&lt;/td>&lt;td>surname&lt;/td>&lt;td>2.5.4.4&lt;/td>&lt;/tr>
<span class='line'>4472</span>  * &lt;tr>&lt;td>DN&lt;/td>&lt;td>distinguishedName&lt;/td>&lt;td>2.5.4.49&lt;/td>&lt;/tr>
<span class='line'>4473</span>  * &lt;tr>&lt;td>E&lt;/td>&lt;td>emailAddress&lt;/td>&lt;td>1.2.840.113549.1.9.1&lt;/td>&lt;/tr>
<span class='line'>4474</span>  * &lt;tr>&lt;td>&lt;/td>&lt;td>businessCategory&lt;/td>&lt;td>2.5.4.15&lt;/td>&lt;/tr>
<span class='line'>4475</span>  * &lt;tr>&lt;td>&lt;/td>&lt;td>postalCode&lt;/td>&lt;td>2.5.4.17&lt;/td>&lt;/tr>
<span class='line'>4476</span>  * &lt;tr>&lt;td>&lt;/td>&lt;td>jurisdictionOfIncorporationL&lt;/td>&lt;td>1.3.6.1.4.1.311.60.2.1.1&lt;/td>&lt;/tr>
<span class='line'>4477</span>  * &lt;tr>&lt;td>&lt;/td>&lt;td>jurisdictionOfIncorporationSP&lt;/td>&lt;td>1.3.6.1.4.1.311.60.2.1.2&lt;/td>&lt;/tr>
<span class='line'>4478</span>  * &lt;tr>&lt;td>&lt;/td>&lt;td>jurisdictionOfIncorporationC&lt;/td>&lt;td>1.3.6.1.4.1.311.60.2.1.3&lt;/td>&lt;/tr>
<span class='line'>4479</span>  * &lt;/table>
<span class='line'>4480</span>  *
<span class='line'>4481</span>  * @example
<span class='line'>4482</span>  */</span><span class="WHIT">
<span class='line'>4483</span> </span><span class="NAME">KJUR.asn1.x509.OID</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4484</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_DERObjectIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.DERObjectIdentifier</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4485</span> 
<span class='line'>4486</span> </span><span class="WHIT">    </span><span class="NAME">this.name2oidList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4487</span> </span><span class="WHIT">	</span><span class="STRN">'aes128-CBC'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.16.840.1.101.3.4.1.2'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4488</span> </span><span class="WHIT">	</span><span class="STRN">'aes256-CBC'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.16.840.1.101.3.4.1.42'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4489</span> 
<span class='line'>4490</span> </span><span class="WHIT">        </span><span class="STRN">'sha1'</span><span class="PUNC">:</span><span class="WHIT">                 </span><span class="STRN">'1.3.14.3.2.26'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4491</span> </span><span class="WHIT">        </span><span class="STRN">'sha256'</span><span class="PUNC">:</span><span class="WHIT">               </span><span class="STRN">'2.16.840.1.101.3.4.2.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4492</span> </span><span class="WHIT">        </span><span class="STRN">'sha384'</span><span class="PUNC">:</span><span class="WHIT">               </span><span class="STRN">'2.16.840.1.101.3.4.2.2'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4493</span> </span><span class="WHIT">        </span><span class="STRN">'sha512'</span><span class="PUNC">:</span><span class="WHIT">               </span><span class="STRN">'2.16.840.1.101.3.4.2.3'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4494</span> </span><span class="WHIT">        </span><span class="STRN">'sha224'</span><span class="PUNC">:</span><span class="WHIT">               </span><span class="STRN">'2.16.840.1.101.3.4.2.4'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4495</span> </span><span class="WHIT">        </span><span class="STRN">'md5'</span><span class="PUNC">:</span><span class="WHIT">                  </span><span class="STRN">'1.2.840.113549.2.5'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4496</span> </span><span class="WHIT">        </span><span class="STRN">'md2'</span><span class="PUNC">:</span><span class="WHIT">                  </span><span class="STRN">'1.3.14.7.2.2.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4497</span> </span><span class="WHIT">        </span><span class="STRN">'ripemd160'</span><span class="PUNC">:</span><span class="WHIT">            </span><span class="STRN">'1.3.36.3.2.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4498</span> 
<span class='line'>4499</span> </span><span class="WHIT">	</span><span class="STRN">'hmacWithSHA1'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'1.2.840.113549.2.7'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4500</span> </span><span class="WHIT">	</span><span class="STRN">'hmacWithSHA224'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'1.2.840.113549.2.8'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4501</span> </span><span class="WHIT">	</span><span class="STRN">'hmacWithSHA256'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'1.2.840.113549.2.9'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4502</span> </span><span class="WHIT">	</span><span class="STRN">'hmacWithSHA384'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'1.2.840.113549.2.10'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4503</span> </span><span class="WHIT">	</span><span class="STRN">'hmacWithSHA512'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'1.2.840.113549.2.11'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4504</span> 
<span class='line'>4505</span> </span><span class="WHIT">        </span><span class="STRN">'MD2withRSA'</span><span class="PUNC">:</span><span class="WHIT">           </span><span class="STRN">'1.2.840.113549.1.1.2'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4506</span> </span><span class="WHIT">        </span><span class="STRN">'MD4withRSA'</span><span class="PUNC">:</span><span class="WHIT">           </span><span class="STRN">'1.2.840.113549.1.1.3'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4507</span> </span><span class="WHIT">        </span><span class="STRN">'MD5withRSA'</span><span class="PUNC">:</span><span class="WHIT">           </span><span class="STRN">'1.2.840.113549.1.1.4'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4508</span> </span><span class="WHIT">        </span><span class="STRN">'SHA1withRSA'</span><span class="PUNC">:</span><span class="WHIT">          </span><span class="STRN">'1.2.840.113549.1.1.5'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4509</span> </span><span class="WHIT">	</span><span class="STRN">'pkcs1-MGF'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'1.2.840.113549.1.1.8'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4510</span> </span><span class="WHIT">	</span><span class="STRN">'rsaPSS'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'1.2.840.113549.1.1.10'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4511</span> </span><span class="WHIT">        </span><span class="STRN">'SHA224withRSA'</span><span class="PUNC">:</span><span class="WHIT">        </span><span class="STRN">'1.2.840.113549.1.1.14'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4512</span> </span><span class="WHIT">        </span><span class="STRN">'SHA256withRSA'</span><span class="PUNC">:</span><span class="WHIT">        </span><span class="STRN">'1.2.840.113549.1.1.11'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4513</span> </span><span class="WHIT">        </span><span class="STRN">'SHA384withRSA'</span><span class="PUNC">:</span><span class="WHIT">        </span><span class="STRN">'1.2.840.113549.1.1.12'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4514</span> </span><span class="WHIT">        </span><span class="STRN">'SHA512withRSA'</span><span class="PUNC">:</span><span class="WHIT">        </span><span class="STRN">'1.2.840.113549.1.1.13'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4515</span> 
<span class='line'>4516</span> </span><span class="WHIT">        </span><span class="STRN">'SHA1withECDSA'</span><span class="PUNC">:</span><span class="WHIT">        </span><span class="STRN">'1.2.840.10045.4.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4517</span> </span><span class="WHIT">        </span><span class="STRN">'SHA224withECDSA'</span><span class="PUNC">:</span><span class="WHIT">      </span><span class="STRN">'1.2.840.10045.4.3.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4518</span> </span><span class="WHIT">        </span><span class="STRN">'SHA256withECDSA'</span><span class="PUNC">:</span><span class="WHIT">      </span><span class="STRN">'1.2.840.10045.4.3.2'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4519</span> </span><span class="WHIT">        </span><span class="STRN">'SHA384withECDSA'</span><span class="PUNC">:</span><span class="WHIT">      </span><span class="STRN">'1.2.840.10045.4.3.3'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4520</span> </span><span class="WHIT">        </span><span class="STRN">'SHA512withECDSA'</span><span class="PUNC">:</span><span class="WHIT">      </span><span class="STRN">'1.2.840.10045.4.3.4'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4521</span> 
<span class='line'>4522</span> </span><span class="WHIT">        </span><span class="STRN">'dsa'</span><span class="PUNC">:</span><span class="WHIT">                  </span><span class="STRN">'1.2.840.10040.4.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4523</span> </span><span class="WHIT">        </span><span class="STRN">'SHA1withDSA'</span><span class="PUNC">:</span><span class="WHIT">          </span><span class="STRN">'1.2.840.10040.4.3'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4524</span> </span><span class="WHIT">        </span><span class="STRN">'SHA224withDSA'</span><span class="PUNC">:</span><span class="WHIT">        </span><span class="STRN">'2.16.840.1.101.3.4.3.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4525</span> </span><span class="WHIT">        </span><span class="STRN">'SHA256withDSA'</span><span class="PUNC">:</span><span class="WHIT">        </span><span class="STRN">'2.16.840.1.101.3.4.3.2'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4526</span> 
<span class='line'>4527</span> </span><span class="WHIT">        </span><span class="STRN">'rsaEncryption'</span><span class="PUNC">:</span><span class="WHIT">        </span><span class="STRN">'1.2.840.113549.1.1.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4528</span> 
<span class='line'>4529</span> </span><span class="WHIT">	</span><span class="COMM">// X.500 AttributeType defined in RFC 4514</span><span class="WHIT">
<span class='line'>4530</span> </span><span class="WHIT">        </span><span class="STRN">'commonName'</span><span class="PUNC">:</span><span class="WHIT">			</span><span class="STRN">'2.5.4.3'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4531</span> </span><span class="WHIT">        </span><span class="STRN">'countryName'</span><span class="PUNC">:</span><span class="WHIT">			</span><span class="STRN">'2.5.4.6'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4532</span> </span><span class="WHIT">        </span><span class="STRN">'localityName'</span><span class="PUNC">:</span><span class="WHIT">			</span><span class="STRN">'2.5.4.7'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4533</span> </span><span class="WHIT">        </span><span class="STRN">'stateOrProvinceName'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.8'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4534</span> </span><span class="WHIT">        </span><span class="STRN">'streetAddress'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.9'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4535</span> </span><span class="WHIT">        </span><span class="STRN">'organizationName'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.10'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4536</span> </span><span class="WHIT">        </span><span class="STRN">'organizationalUnitName'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'2.5.4.11'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4537</span> </span><span class="WHIT">        </span><span class="STRN">'domainComponent'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'0.9.2342.19200300.100.1.25'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4538</span> </span><span class="WHIT">        </span><span class="STRN">'userId'</span><span class="PUNC">:</span><span class="WHIT">			</span><span class="STRN">'0.9.2342.19200300.100.1.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4539</span> </span><span class="WHIT">	</span><span class="COMM">// other AttributeType name string</span><span class="WHIT">
<span class='line'>4540</span> </span><span class="WHIT">	</span><span class="STRN">'surname'</span><span class="PUNC">:</span><span class="WHIT">			</span><span class="STRN">'2.5.4.4'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4541</span> </span><span class="WHIT">        </span><span class="STRN">'givenName'</span><span class="PUNC">:</span><span class="WHIT">                    </span><span class="STRN">'2.5.4.42'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4542</span> </span><span class="WHIT">        </span><span class="STRN">'title'</span><span class="PUNC">:</span><span class="WHIT">			</span><span class="STRN">'2.5.4.12'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4543</span> </span><span class="WHIT">	</span><span class="STRN">'distinguishedName'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.49'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4544</span> </span><span class="WHIT">	</span><span class="STRN">'emailAddress'</span><span class="PUNC">:</span><span class="WHIT">			</span><span class="STRN">'1.2.840.113549.1.9.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4545</span> </span><span class="WHIT">	</span><span class="COMM">// other AttributeType name string (no short name)</span><span class="WHIT">
<span class='line'>4546</span> </span><span class="WHIT">	</span><span class="STRN">'description'</span><span class="PUNC">:</span><span class="WHIT">			</span><span class="STRN">'2.5.4.13'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4547</span> </span><span class="WHIT">	</span><span class="STRN">'businessCategory'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.15'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4548</span> </span><span class="WHIT">	</span><span class="STRN">'postalCode'</span><span class="PUNC">:</span><span class="WHIT">			</span><span class="STRN">'2.5.4.17'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4549</span> </span><span class="WHIT">	</span><span class="STRN">'uniqueIdentifier'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.45'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4550</span> </span><span class="WHIT">	</span><span class="STRN">'organizationIdentifier'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'2.5.4.97'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4551</span> </span><span class="WHIT">	</span><span class="STRN">'jurisdictionOfIncorporationL'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'1.3.6.1.4.1.311.60.2.1.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4552</span> </span><span class="WHIT">	</span><span class="STRN">'jurisdictionOfIncorporationSP'</span><span class="PUNC">:</span><span class="STRN">'1.3.6.1.4.1.311.60.2.1.2'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4553</span> </span><span class="WHIT">	</span><span class="STRN">'jurisdictionOfIncorporationC'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'1.3.6.1.4.1.311.60.2.1.3'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4554</span> 
<span class='line'>4555</span> </span><span class="WHIT">        </span><span class="STRN">'subjectDirectoryAttributes'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'2.5.29.9'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4556</span> </span><span class="WHIT">        </span><span class="STRN">'subjectKeyIdentifier'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'2.5.29.14'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4557</span> </span><span class="WHIT">        </span><span class="STRN">'keyUsage'</span><span class="PUNC">:</span><span class="WHIT">             </span><span class="STRN">'2.5.29.15'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4558</span> </span><span class="WHIT">        </span><span class="STRN">'subjectAltName'</span><span class="PUNC">:</span><span class="WHIT">       </span><span class="STRN">'2.5.29.17'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4559</span> </span><span class="WHIT">        </span><span class="STRN">'issuerAltName'</span><span class="PUNC">:</span><span class="WHIT">        </span><span class="STRN">'2.5.29.18'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4560</span> </span><span class="WHIT">        </span><span class="STRN">'basicConstraints'</span><span class="PUNC">:</span><span class="WHIT">     </span><span class="STRN">'2.5.29.19'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4561</span> </span><span class="WHIT">        </span><span class="STRN">'cRLNumber'</span><span class="PUNC">:</span><span class="WHIT">     	</span><span class="STRN">'2.5.29.20'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4562</span> </span><span class="WHIT">        </span><span class="STRN">'cRLReason'</span><span class="PUNC">:</span><span class="WHIT">     	</span><span class="STRN">'2.5.29.21'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4563</span> </span><span class="WHIT">        </span><span class="STRN">'nameConstraints'</span><span class="PUNC">:</span><span class="WHIT">      </span><span class="STRN">'2.5.29.30'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4564</span> </span><span class="WHIT">        </span><span class="STRN">'cRLDistributionPoints'</span><span class="PUNC">:</span><span class="STRN">'2.5.29.31'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4565</span> </span><span class="WHIT">        </span><span class="STRN">'certificatePolicies'</span><span class="PUNC">:</span><span class="WHIT">  </span><span class="STRN">'2.5.29.32'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4566</span> </span><span class="WHIT">        </span><span class="STRN">'anyPolicy'</span><span class="PUNC">:</span><span class="WHIT">  		</span><span class="STRN">'2.5.29.32.0'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4567</span> </span><span class="WHIT">	</span><span class="STRN">'policyMappings'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'2.5.29.33'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4568</span> </span><span class="WHIT">        </span><span class="STRN">'authorityKeyIdentifier'</span><span class="PUNC">:</span><span class="STRN">'2.5.29.35'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4569</span> </span><span class="WHIT">        </span><span class="STRN">'policyConstraints'</span><span class="PUNC">:</span><span class="WHIT">    </span><span class="STRN">'2.5.29.36'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4570</span> </span><span class="WHIT">        </span><span class="STRN">'extKeyUsage'</span><span class="PUNC">:</span><span class="WHIT">          </span><span class="STRN">'2.5.29.37'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4571</span> </span><span class="WHIT">	</span><span class="STRN">'inhibitAnyPolicy'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'2.5.29.54'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4572</span> </span><span class="WHIT">        </span><span class="STRN">'authorityInfoAccess'</span><span class="PUNC">:</span><span class="WHIT">  </span><span class="STRN">'1.3.6.1.5.5.7.1.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4573</span> </span><span class="WHIT">        </span><span class="STRN">'ocsp'</span><span class="PUNC">:</span><span class="WHIT">                 </span><span class="STRN">'1.3.6.1.5.5.7.48.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4574</span> </span><span class="WHIT">        </span><span class="STRN">'ocspBasic'</span><span class="PUNC">:</span><span class="WHIT">            </span><span class="STRN">'1.3.6.1.5.5.7.48.1.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4575</span> </span><span class="WHIT">        </span><span class="STRN">'ocspNonce'</span><span class="PUNC">:</span><span class="WHIT">            </span><span class="STRN">'1.3.6.1.5.5.7.48.1.2'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4576</span> </span><span class="WHIT">        </span><span class="STRN">'ocspNoCheck'</span><span class="PUNC">:</span><span class="WHIT">          </span><span class="STRN">'1.3.6.1.5.5.7.48.1.5'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4577</span> </span><span class="WHIT">        </span><span class="STRN">'caIssuers'</span><span class="PUNC">:</span><span class="WHIT">            </span><span class="STRN">'1.3.6.1.5.5.7.48.2'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4578</span> 
<span class='line'>4579</span> </span><span class="WHIT">        </span><span class="STRN">'anyExtendedKeyUsage'</span><span class="PUNC">:</span><span class="WHIT">  </span><span class="STRN">'2.5.29.37.0'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4580</span> </span><span class="WHIT">        </span><span class="STRN">'serverAuth'</span><span class="PUNC">:</span><span class="WHIT">           </span><span class="STRN">'1.3.6.1.5.5.7.3.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4581</span> </span><span class="WHIT">        </span><span class="STRN">'clientAuth'</span><span class="PUNC">:</span><span class="WHIT">           </span><span class="STRN">'1.3.6.1.5.5.7.3.2'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4582</span> </span><span class="WHIT">        </span><span class="STRN">'codeSigning'</span><span class="PUNC">:</span><span class="WHIT">          </span><span class="STRN">'1.3.6.1.5.5.7.3.3'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4583</span> </span><span class="WHIT">        </span><span class="STRN">'emailProtection'</span><span class="PUNC">:</span><span class="WHIT">      </span><span class="STRN">'1.3.6.1.5.5.7.3.4'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4584</span> </span><span class="WHIT">        </span><span class="STRN">'timeStamping'</span><span class="PUNC">:</span><span class="WHIT">         </span><span class="STRN">'1.3.6.1.5.5.7.3.8'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4585</span> </span><span class="WHIT">        </span><span class="STRN">'ocspSigning'</span><span class="PUNC">:</span><span class="WHIT">          </span><span class="STRN">'1.3.6.1.5.5.7.3.9'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4586</span> 
<span class='line'>4587</span> </span><span class="WHIT">	</span><span class="COMM">// 'otherNameForms':	'1.3.6.1.5.5.7.8',</span><span class="WHIT">
<span class='line'>4588</span> </span><span class="WHIT">	</span><span class="STRN">'smtpUTF8Mailbox'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'1.3.6.1.5.5.7.8.9'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4589</span> 
<span class='line'>4590</span> </span><span class="WHIT">        </span><span class="STRN">'dateOfBirth'</span><span class="PUNC">:</span><span class="WHIT">          </span><span class="STRN">'1.3.6.1.5.5.7.9.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4591</span> </span><span class="WHIT">        </span><span class="STRN">'placeOfBirth'</span><span class="PUNC">:</span><span class="WHIT">         </span><span class="STRN">'1.3.6.1.5.5.7.9.2'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4592</span> </span><span class="WHIT">        </span><span class="STRN">'gender'</span><span class="PUNC">:</span><span class="WHIT">               </span><span class="STRN">'1.3.6.1.5.5.7.9.3'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4593</span> </span><span class="WHIT">        </span><span class="STRN">'countryOfCitizenship'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'1.3.6.1.5.5.7.9.4'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4594</span> </span><span class="WHIT">        </span><span class="STRN">'countryOfResidence'</span><span class="PUNC">:</span><span class="WHIT">   </span><span class="STRN">'1.3.6.1.5.5.7.9.5'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4595</span> 
<span class='line'>4596</span> </span><span class="WHIT">        </span><span class="STRN">'ecPublicKey'</span><span class="PUNC">:</span><span class="WHIT">          </span><span class="STRN">'1.2.840.10045.2.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4597</span> </span><span class="WHIT">        </span><span class="STRN">'P-256'</span><span class="PUNC">:</span><span class="WHIT">                </span><span class="STRN">'1.2.840.10045.3.1.7'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4598</span> </span><span class="WHIT">        </span><span class="STRN">'secp256r1'</span><span class="PUNC">:</span><span class="WHIT">            </span><span class="STRN">'1.2.840.10045.3.1.7'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4599</span> </span><span class="WHIT">        </span><span class="STRN">'secp256k1'</span><span class="PUNC">:</span><span class="WHIT">            </span><span class="STRN">'1.3.132.0.10'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4600</span> </span><span class="WHIT">        </span><span class="STRN">'secp384r1'</span><span class="PUNC">:</span><span class="WHIT">            </span><span class="STRN">'1.3.132.0.34'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4601</span> </span><span class="WHIT">        </span><span class="STRN">'secp521r1'</span><span class="PUNC">:</span><span class="WHIT">            </span><span class="STRN">'1.3.132.0.35'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4602</span> 
<span class='line'>4603</span> </span><span class="WHIT">        </span><span class="STRN">'pkcs5PBES2'</span><span class="PUNC">:</span><span class="WHIT">           </span><span class="STRN">'1.2.840.113549.1.5.13'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4604</span> </span><span class="WHIT">        </span><span class="STRN">'pkcs5PBKDF2'</span><span class="PUNC">:</span><span class="WHIT">          </span><span class="STRN">'1.2.840.113549.1.5.12'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4605</span> 
<span class='line'>4606</span> </span><span class="WHIT">        </span><span class="STRN">'des-EDE3-CBC'</span><span class="PUNC">:</span><span class="WHIT">         </span><span class="STRN">'1.2.840.113549.3.7'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4607</span> 
<span class='line'>4608</span> </span><span class="WHIT">        </span><span class="STRN">'data'</span><span class="PUNC">:</span><span class="WHIT">                 </span><span class="STRN">'1.2.840.113549.1.7.1'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// CMS data</span><span class="WHIT">
<span class='line'>4609</span> </span><span class="WHIT">        </span><span class="STRN">'signed-data'</span><span class="PUNC">:</span><span class="WHIT">          </span><span class="STRN">'1.2.840.113549.1.7.2'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// CMS signed-data</span><span class="WHIT">
<span class='line'>4610</span> </span><span class="WHIT">        </span><span class="STRN">'enveloped-data'</span><span class="PUNC">:</span><span class="WHIT">       </span><span class="STRN">'1.2.840.113549.1.7.3'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// CMS enveloped-data</span><span class="WHIT">
<span class='line'>4611</span> </span><span class="WHIT">        </span><span class="STRN">'digested-data'</span><span class="PUNC">:</span><span class="WHIT">        </span><span class="STRN">'1.2.840.113549.1.7.5'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// CMS digested-data</span><span class="WHIT">
<span class='line'>4612</span> </span><span class="WHIT">        </span><span class="STRN">'encrypted-data'</span><span class="PUNC">:</span><span class="WHIT">       </span><span class="STRN">'1.2.840.113549.1.7.6'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// CMS encrypted-data</span><span class="WHIT">
<span class='line'>4613</span> </span><span class="WHIT">        </span><span class="STRN">'authenticated-data'</span><span class="PUNC">:</span><span class="WHIT">   </span><span class="STRN">'1.2.840.113549.1.9.16.1.2'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// CMS authenticated-data</span><span class="WHIT">
<span class='line'>4614</span> </span><span class="WHIT">        </span><span class="STRN">'tstinfo'</span><span class="PUNC">:</span><span class="WHIT">              </span><span class="STRN">'1.2.840.113549.1.9.16.1.4'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// RFC3161 TSTInfo</span><span class="WHIT">
<span class='line'>4615</span> </span><span class="WHIT">	</span><span class="STRN">'signingCertificate'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'1.2.840.113549.1.9.16.2.12'</span><span class="PUNC">,</span><span class="COMM">// SMIME</span><span class="WHIT">
<span class='line'>4616</span> </span><span class="WHIT">	</span><span class="STRN">'timeStampToken'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'1.2.840.113549.1.9.16.2.14'</span><span class="PUNC">,</span><span class="COMM">// sigTS</span><span class="WHIT">
<span class='line'>4617</span> </span><span class="WHIT">	</span><span class="STRN">'signaturePolicyIdentifier'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'1.2.840.113549.1.9.16.2.15'</span><span class="PUNC">,</span><span class="COMM">// cades</span><span class="WHIT">
<span class='line'>4618</span> </span><span class="WHIT">	</span><span class="STRN">'etsArchiveTimeStamp'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'1.2.840.113549.1.9.16.2.27'</span><span class="PUNC">,</span><span class="COMM">// SMIME</span><span class="WHIT">
<span class='line'>4619</span> </span><span class="WHIT">	</span><span class="STRN">'signingCertificateV2'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'1.2.840.113549.1.9.16.2.47'</span><span class="PUNC">,</span><span class="COMM">// SMIME</span><span class="WHIT">
<span class='line'>4620</span> </span><span class="WHIT">	</span><span class="STRN">'etsArchiveTimeStampV2'</span><span class="PUNC">:</span><span class="STRN">'1.2.840.113549.1.9.16.2.48'</span><span class="PUNC">,</span><span class="COMM">// SMIME</span><span class="WHIT">
<span class='line'>4621</span> </span><span class="WHIT">        </span><span class="STRN">'extensionRequest'</span><span class="PUNC">:</span><span class="WHIT">     </span><span class="STRN">'1.2.840.113549.1.9.14'</span><span class="PUNC">,</span><span class="COMM">// CSR extensionRequest</span><span class="WHIT">
<span class='line'>4622</span> </span><span class="WHIT">	</span><span class="STRN">'contentType'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'1.2.840.113549.1.9.3'</span><span class="PUNC">,</span><span class="COMM">//PKCS#9</span><span class="WHIT">
<span class='line'>4623</span> </span><span class="WHIT">	</span><span class="STRN">'messageDigest'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'1.2.840.113549.1.9.4'</span><span class="PUNC">,</span><span class="COMM">//PKCS#9</span><span class="WHIT">
<span class='line'>4624</span> </span><span class="WHIT">	</span><span class="STRN">'signingTime'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'1.2.840.113549.1.9.5'</span><span class="PUNC">,</span><span class="COMM">//PKCS#9</span><span class="WHIT">
<span class='line'>4625</span> </span><span class="WHIT">	</span><span class="STRN">'counterSignature'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'1.2.840.113549.1.9.6'</span><span class="PUNC">,</span><span class="COMM">//PKCS#9</span><span class="WHIT">
<span class='line'>4626</span> </span><span class="WHIT">	</span><span class="STRN">'archiveTimeStampV3'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'0.4.0.1733.2.4'</span><span class="PUNC">,</span><span class="COMM">//ETSI EN29319122/TS101733</span><span class="WHIT">
<span class='line'>4627</span> </span><span class="WHIT">	</span><span class="STRN">'pdfRevocationInfoArchival'</span><span class="PUNC">:</span><span class="STRN">'1.2.840.113583.1.1.8'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">//Adobe</span><span class="WHIT">
<span class='line'>4628</span> </span><span class="WHIT">	</span><span class="STRN">'adobeTimeStamp'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'1.2.840.113583.1.1.9.1'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// Adobe</span><span class="WHIT">
<span class='line'>4629</span> </span><span class="WHIT">	</span><span class="COMM">// CABF S/MIME BR</span><span class="WHIT">
<span class='line'>4630</span> </span><span class="WHIT">	</span><span class="STRN">'smimeMailboxLegacy'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.23.140.1.5.1.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4631</span> </span><span class="WHIT">	</span><span class="STRN">'smimeMailboxMulti'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.23.140.1.5.1.2'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4632</span> </span><span class="WHIT">	</span><span class="STRN">'smimeMailboxStrict'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.23.140.1.5.1.3'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4633</span> </span><span class="WHIT">	</span><span class="STRN">'smimeOrganizationLegacy'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'2.23.140.1.5.2.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4634</span> </span><span class="WHIT">	</span><span class="STRN">'smimeOrganizationMulti'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'2.23.140.1.5.2.2'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4635</span> </span><span class="WHIT">	</span><span class="STRN">'smimeOrganizationStrict'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'2.23.140.1.5.2.3'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4636</span> </span><span class="WHIT">	</span><span class="STRN">'smimeSponsorLegacy'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.23.140.1.5.3.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4637</span> </span><span class="WHIT">	</span><span class="STRN">'smimeSponsorMulti'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.23.140.1.5.3.2'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4638</span> </span><span class="WHIT">	</span><span class="STRN">'smimeSponsorStrict'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.23.140.1.5.3.3'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4639</span> </span><span class="WHIT">	</span><span class="STRN">'smimeIndividualLegacy'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'2.23.140.1.5.4.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4640</span> </span><span class="WHIT">	</span><span class="STRN">'smimeIndividualMulti'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.23.140.1.5.4.2'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4641</span> </span><span class="WHIT">	</span><span class="STRN">'smimeIndividualStrict'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'2.23.140.1.5.4.3'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4642</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4643</span> 
<span class='line'>4644</span> </span><span class="WHIT">    </span><span class="NAME">this.atype2oidList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4645</span> </span><span class="WHIT">	</span><span class="COMM">// RFC 4514 AttributeType name string (MUST recognized)</span><span class="WHIT">
<span class='line'>4646</span> </span><span class="WHIT">        </span><span class="STRN">'CN'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.3'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4647</span> </span><span class="WHIT">        </span><span class="STRN">'L'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.7'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4648</span> </span><span class="WHIT">        </span><span class="STRN">'ST'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.8'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4649</span> </span><span class="WHIT">        </span><span class="STRN">'O'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.10'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4650</span> </span><span class="WHIT">        </span><span class="STRN">'OU'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.11'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4651</span> </span><span class="WHIT">        </span><span class="STRN">'C'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.6'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4652</span> </span><span class="WHIT">        </span><span class="STRN">'STREET'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'2.5.4.9'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4653</span> </span><span class="WHIT">        </span><span class="STRN">'DC'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'0.9.2342.19200300.100.1.25'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4654</span> </span><span class="WHIT">        </span><span class="STRN">'UID'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'0.9.2342.19200300.100.1.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4655</span> </span><span class="WHIT">	</span><span class="COMM">// other AttributeType name string</span><span class="WHIT">
<span class='line'>4656</span> </span><span class="WHIT">	</span><span class="COMM">// http://blog.livedoor.jp/k_urushima/archives/656114.html</span><span class="WHIT">
<span class='line'>4657</span> </span><span class="WHIT">        </span><span class="STRN">'SN'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.4'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// surname</span><span class="WHIT">
<span class='line'>4658</span> </span><span class="WHIT">        </span><span class="STRN">'T'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.12'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// title</span><span class="WHIT">
<span class='line'>4659</span> </span><span class="WHIT">        </span><span class="STRN">'GN'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.42'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// givenName</span><span class="WHIT">
<span class='line'>4660</span> </span><span class="WHIT">        </span><span class="STRN">'DN'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.49'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// distinguishedName</span><span class="WHIT">
<span class='line'>4661</span> </span><span class="WHIT">        </span><span class="STRN">'E'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'1.2.840.113549.1.9.1'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// emailAddress in MS.NET or Bouncy</span><span class="WHIT">
<span class='line'>4662</span> </span><span class="WHIT">	</span><span class="COMM">// other AttributeType name string (no short name)</span><span class="WHIT">
<span class='line'>4663</span> </span><span class="WHIT">	</span><span class="STRN">'description'</span><span class="PUNC">:</span><span class="WHIT">			</span><span class="STRN">'2.5.4.13'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4664</span> </span><span class="WHIT">	</span><span class="STRN">'businessCategory'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.15'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4665</span> </span><span class="WHIT">	</span><span class="STRN">'postalCode'</span><span class="PUNC">:</span><span class="WHIT">			</span><span class="STRN">'2.5.4.17'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4666</span> </span><span class="WHIT">	</span><span class="STRN">'serialNumber'</span><span class="PUNC">:</span><span class="WHIT">			</span><span class="STRN">'2.5.4.5'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4667</span> </span><span class="WHIT">	</span><span class="STRN">'uniqueIdentifier'</span><span class="PUNC">:</span><span class="WHIT">		</span><span class="STRN">'2.5.4.45'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4668</span> </span><span class="WHIT">	</span><span class="STRN">'organizationIdentifier'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'2.5.4.97'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4669</span> </span><span class="WHIT">	</span><span class="STRN">'jurisdictionOfIncorporationL'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'1.3.6.1.4.1.311.60.2.1.1'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4670</span> </span><span class="WHIT">	</span><span class="STRN">'jurisdictionOfIncorporationSP'</span><span class="PUNC">:</span><span class="STRN">'1.3.6.1.4.1.311.60.2.1.2'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4671</span> </span><span class="WHIT">	</span><span class="STRN">'jurisdictionOfIncorporationC'</span><span class="PUNC">:</span><span class="WHIT">	</span><span class="STRN">'1.3.6.1.4.1.311.60.2.1.3'</span><span class="WHIT">
<span class='line'>4672</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4673</span> </span><span class="WHIT">    
<span class='line'>4674</span>     </span><span class="NAME">this.objCache</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4675</span> 
<span class='line'>4676</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>4677</span>      * get DERObjectIdentifier by registered OID name
<span class='line'>4678</span>      * @name name2obj
<span class='line'>4679</span>      * @memberOf KJUR.asn1.x509.OID
<span class='line'>4680</span>      * @function
<span class='line'>4681</span>      * @param {String} name OID
<span class='line'>4682</span>      * @return {Object} DERObjectIdentifier instance
<span class='line'>4683</span>      * @see KJUR.asn1.DERObjectIdentifier
<span class='line'>4684</span>      *
<span class='line'>4685</span>      * @description
<span class='line'>4686</span>      * This static method returns DERObjectIdentifier object
<span class='line'>4687</span>      * for the specified OID.
<span class='line'>4688</span>      *
<span class='line'>4689</span>      * @example
<span class='line'>4690</span>      * var asn1ObjOID = KJUR.asn1.x509.OID.name2obj('SHA1withRSA');
<span class='line'>4691</span>      */</span><span class="WHIT">
<span class='line'>4692</span> </span><span class="WHIT">    </span><span class="NAME">this.name2obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">name</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4693</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">this.objCache</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>4694</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.objCache</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4695</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">this.name2oidList</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>4696</span> </span><span class="WHIT">            </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"Name of ObjectIdentifier not defined: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4697</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.name2oidList</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4698</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERObjectIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'oid'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">oid</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4699</span> </span><span class="WHIT">        </span><span class="NAME">this.objCache</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4700</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4701</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4702</span> 
<span class='line'>4703</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>4704</span>      * get DERObjectIdentifier by registered attribute type name such like 'C' or 'CN'&lt;br/>
<span class='line'>4705</span>      * @name atype2obj
<span class='line'>4706</span>      * @memberOf KJUR.asn1.x509.OID
<span class='line'>4707</span>      * @function
<span class='line'>4708</span>      * @param {String} atype short attribute type name such like 'C', 'CN' or OID
<span class='line'>4709</span>      * @return KJUR.asn1.DERObjectIdentifier instance
<span class='line'>4710</span>      * @description
<span class='line'>4711</span>      * @example
<span class='line'>4712</span>      * KJUR.asn1.x509.OID.atype2obj('CN') &rarr; DERObjectIdentifier of 2.5.4.3
<span class='line'>4713</span>      * KJUR.asn1.x509.OID.atype2obj('OU') &rarr; DERObjectIdentifier of 2.5.4.11
<span class='line'>4714</span>      * KJUR.asn1.x509.OID.atype2obj('streetAddress') &rarr; DERObjectIdentifier of 2.5.4.9
<span class='line'>4715</span>      * KJUR.asn1.x509.OID.atype2obj('2.5.4.9') &rarr; DERObjectIdentifier of 2.5.4.9
<span class='line'>4716</span>      */</span><span class="WHIT">
<span class='line'>4717</span> </span><span class="WHIT">    </span><span class="NAME">this.atype2obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">atype</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4718</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.objCache</span><span class="PUNC">[</span><span class="NAME">atype</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>4719</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.objCache</span><span class="PUNC">[</span><span class="NAME">atype</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4720</span> 
<span class='line'>4721</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">oid</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4722</span> 
<span class='line'>4723</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">atype.match</span><span class="PUNC">(</span><span class="REGX">/^\d+\.\d+\.[0-9.]+$/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4724</span> </span><span class="WHIT">	    </span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">atype</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4725</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.atype2oidList</span><span class="PUNC">[</span><span class="NAME">atype</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4726</span> </span><span class="WHIT">	    </span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.atype2oidList</span><span class="PUNC">[</span><span class="NAME">atype</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4727</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.name2oidList</span><span class="PUNC">[</span><span class="NAME">atype</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4728</span> </span><span class="WHIT">	    </span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.name2oidList</span><span class="PUNC">[</span><span class="NAME">atype</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4729</span> </span><span class="WHIT">    	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4730</span> </span><span class="WHIT">            </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"AttributeType name undefined: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">atype</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4731</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4732</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERObjectIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'oid'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">oid</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4733</span> </span><span class="WHIT">        </span><span class="NAME">this.objCache</span><span class="PUNC">[</span><span class="NAME">atype</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4734</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4735</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4736</span> 
<span class='line'>4737</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>4738</span>      * register OID list&lt;br/>
<span class='line'>4739</span>      * @name registerOIDs
<span class='line'>4740</span>      * @memberOf KJUR.asn1.x509.OID
<span class='line'>4741</span>      * @function
<span class='line'>4742</span>      * @param {object} oids associative array of names and oids
<span class='line'>4743</span>      * @since jsrsasign 10.5.2 asn1x509 2.1.11
<span class='line'>4744</span>      * @see KJUR.asn1.x509.OID.checkOIDs
<span class='line'>4745</span>      * 
<span class='line'>4746</span>      * @description
<span class='line'>4747</span>      * This static method to register an oids to existing list
<span class='line'>4748</span>      * additionally.
<span class='line'>4749</span>      *
<span class='line'>4750</span>      * @example
<span class='line'>4751</span>      * KJUR.asn1.x509.OID.checkOIDs({
<span class='line'>4752</span>      *   "test1": "4.5.7.8"
<span class='line'>4753</span>      * }) // do nothing for invalid list
<span class='line'>4754</span>      *
<span class='line'>4755</span>      * KJUR.asn1.x509.OID.registerOIDs({
<span class='line'>4756</span>      *   "test1": "1.2.3",
<span class='line'>4757</span>      *   "test2": "0.2.3.4.23",
<span class='line'>4758</span>      * }) // successfully registered
<span class='line'>4759</span>      *
<span class='line'>4760</span>      * KJUR.asn1.x509.OID.name2oid("test1") &rarr; "1.2.3"
<span class='line'>4761</span>      */</span><span class="WHIT">
<span class='line'>4762</span> </span><span class="WHIT">    </span><span class="NAME">this.registerOIDs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">oids</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4763</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="WHIT"> </span><span class="NAME">this.checkOIDs</span><span class="PUNC">(</span><span class="NAME">oids</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4764</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">oids</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4765</span> </span><span class="WHIT">	    </span><span class="NAME">this.name2oidList</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">oids</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4766</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4767</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4768</span> 
<span class='line'>4769</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>4770</span>      * check validity for OID list&lt;br/>
<span class='line'>4771</span>      * @name checkOIDs
<span class='line'>4772</span>      * @memberOf KJUR.asn1.x509.OID
<span class='line'>4773</span>      * @function
<span class='line'>4774</span>      * @param {object} oids associative array of names and oids
<span class='line'>4775</span>      * @return {boolean} return true when valid OID list otherwise false
<span class='line'>4776</span>      * @since jsrsasign 10.5.2 asn1x509 2.1.11
<span class='line'>4777</span>      * @see KJUR.asn1.x509.OID.registOIDs
<span class='line'>4778</span>      * 
<span class='line'>4779</span>      * @description
<span class='line'>4780</span>      * This static method validates an associative array
<span class='line'>4781</span>      * as oid list.
<span class='line'>4782</span>      *
<span class='line'>4783</span>      * @example
<span class='line'>4784</span>      * KJUR.asn1.x509.OID.checkOIDs(*non-assoc-array*) &rarr; false
<span class='line'>4785</span>      * KJUR.asn1.x509.OID.checkOIDs({}) &rarr; false
<span class='line'>4786</span>      * KJUR.asn1.x509.OID.checkOIDs({"test1": "apple"}) &rarr; false
<span class='line'>4787</span>      * KJUR.asn1.x509.OID.checkOIDs({
<span class='line'>4788</span>      *   "test1": "1.2.3",
<span class='line'>4789</span>      *   "test2": "0.2.3.4.23",
<span class='line'>4790</span>      * }) &rarr; true // valid oids
<span class='line'>4791</span>      * KJUR.asn1.x509.OID.checkOIDs({
<span class='line'>4792</span>      *   "test1": "4.5.7.8"
<span class='line'>4793</span>      * }) &rarr; false // invalid oid
<span class='line'>4794</span>      */</span><span class="WHIT">
<span class='line'>4795</span> </span><span class="WHIT">    </span><span class="NAME">this.checkOIDs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">oids</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4796</span> </span><span class="WHIT">	</span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4797</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nameList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Object.keys</span><span class="PUNC">(</span><span class="NAME">oids</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4798</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nameList.length</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>4799</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4800</span> </span><span class="WHIT">	    </span><span class="NAME">nameList.map</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">value</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">index</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">array</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4801</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">[</span><span class="NAME">value</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4802</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="WHIT"> </span><span class="NAME">oid.match</span><span class="PUNC">(</span><span class="REGX">/^[0-2]\.[0-9.]+$/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>4803</span> </span><span class="WHIT">		    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"value is not OID"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4804</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">oids</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4805</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4806</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4807</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4808</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4809</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4810</span> 
<span class='line'>4811</span> 
<span class='line'>4812</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4813</span> 
<span class='line'>4814</span> </span><span class="COMM">/**
<span class='line'>4815</span>  * convert OID to name&lt;br/>
<span class='line'>4816</span>  * @name oid2name
<span class='line'>4817</span>  * @memberOf KJUR.asn1.x509.OID
<span class='line'>4818</span>  * @function
<span class='line'>4819</span>  * @param {String} oid dot noted Object Identifer string (ex. 1.2.3.4)
<span class='line'>4820</span>  * @return {String} OID name if registered otherwise empty string
<span class='line'>4821</span>  * @since asn1x509 1.0.9
<span class='line'>4822</span>  * @description
<span class='line'>4823</span>  * This static method converts OID string to its name.
<span class='line'>4824</span>  * If OID is undefined then it returns empty string (i.e. '').
<span class='line'>4825</span>  * @example
<span class='line'>4826</span>  * KJUR.asn1.x509.OID.oid2name("1.3.6.1.5.5.7.1.1") &rarr; 'authorityInfoAccess'
<span class='line'>4827</span>  */</span><span class="WHIT">
<span class='line'>4828</span> </span><span class="NAME">KJUR.asn1.x509.OID.oid2name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">oid</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4829</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">list</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.OID.name2oidList</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4830</span> </span><span class="WHIT">    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">list</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4831</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">list</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">oid</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4832</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4833</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4834</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4835</span> 
<span class='line'>4836</span> </span><span class="COMM">/**
<span class='line'>4837</span>  * convert OID to AttributeType name&lt;br/>
<span class='line'>4838</span>  * @name oid2atype
<span class='line'>4839</span>  * @memberOf KJUR.asn1.x509.OID
<span class='line'>4840</span>  * @function
<span class='line'>4841</span>  * @param {String} oid dot noted Object Identifer string (ex. 1.2.3.4)
<span class='line'>4842</span>  * @return {String} OID AttributeType name if registered otherwise oid
<span class='line'>4843</span>  * @since jsrsasign 6.2.2 asn1x509 1.0.18
<span class='line'>4844</span>  * @description
<span class='line'>4845</span>  * This static method converts OID string to its AttributeType name.
<span class='line'>4846</span>  * If OID is not defined in OID.atype2oidList associative array then it returns OID
<span class='line'>4847</span>  * specified as argument.
<span class='line'>4848</span>  * @example
<span class='line'>4849</span>  * KJUR.asn1.x509.OID.oid2atype("2.5.4.3") &rarr; CN
<span class='line'>4850</span>  * KJUR.asn1.x509.OID.oid2atype("1.3.6.1.4.1.311.60.2.1.3") &rarr; jurisdictionOfIncorporationC
<span class='line'>4851</span>  * KJUR.asn1.x509.OID.oid2atype("0.1.2.3.4") &rarr; 0.1.2.3.4 // unregistered OID
<span class='line'>4852</span>  */</span><span class="WHIT">
<span class='line'>4853</span> </span><span class="NAME">KJUR.asn1.x509.OID.oid2atype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">oid</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4854</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">list</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.OID.atype2oidList</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4855</span> </span><span class="WHIT">    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">atype</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">list</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4856</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">list</span><span class="PUNC">[</span><span class="NAME">atype</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">oid</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">atype</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4857</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>4858</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">oid</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4859</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4860</span> 
<span class='line'>4861</span> </span><span class="COMM">/**
<span class='line'>4862</span>  * convert OID name to OID value&lt;br/>
<span class='line'>4863</span>  * @name name2oid
<span class='line'>4864</span>  * @memberOf KJUR.asn1.x509.OID
<span class='line'>4865</span>  * @function
<span class='line'>4866</span>  * @param {String} name OID name or OID (ex. "sha1" or "1.2.3.4")
<span class='line'>4867</span>  * @return {String} dot noted Object Identifer string (ex. 1.2.3.4)
<span class='line'>4868</span>  * @since asn1x509 1.0.11
<span class='line'>4869</span>  * @description
<span class='line'>4870</span>  * This static method converts from OID name to OID string.
<span class='line'>4871</span>  * If OID is undefined then it returns empty string (i.e. '').
<span class='line'>4872</span>  * @example
<span class='line'>4873</span>  * KJUR.asn1.x509.OID.name2oid("authorityInfoAccess") &rarr; "1.3.6.1.5.5.7.1.1"
<span class='line'>4874</span>  * KJUR.asn1.x509.OID.name2oid("1.2.3.4") &rarr; "1.2.3.4"
<span class='line'>4875</span>  * KJUR.asn1.x509.OID.name2oid("UNKNOWN NAME") &rarr; ""
<span class='line'>4876</span>  */</span><span class="WHIT">
<span class='line'>4877</span> </span><span class="NAME">KJUR.asn1.x509.OID.name2oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">name</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4878</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">name.match</span><span class="PUNC">(</span><span class="REGX">/^[0-9.]+$/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4879</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">list</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.OID.name2oidList</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4880</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">list</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4881</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">list</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4882</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4883</span> 
<span class='line'>4884</span> </span><span class="COMM">/**
<span class='line'>4885</span>  * X.509 certificate and CRL utilities class&lt;br/>
<span class='line'>4886</span>  * @name KJUR.asn1.x509.X509Util
<span class='line'>4887</span>  * @class X.509 certificate and CRL utilities class
<span class='line'>4888</span>  */</span><span class="WHIT">
<span class='line'>4889</span> </span><span class="NAME">KJUR.asn1.x509.X509Util</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4890</span> 
<span class='line'>4891</span> </span><span class="COMM">/**
<span class='line'>4892</span>  * issue a certificate in PEM format (DEPRECATED)
<span class='line'>4893</span>  * @name newCertPEM
<span class='line'>4894</span>  * @memberOf KJUR.asn1.x509.X509Util
<span class='line'>4895</span>  * @function
<span class='line'>4896</span>  * @param {Array} param JSON object of parameter to issue a certificate
<span class='line'>4897</span>  * @since asn1x509 1.0.6
<span class='line'>4898</span>  * @deprecated since jsrsasign 9.0.0 asn1x509 2.0.0. please move to {@link KJUR.asn1.x509.Certificate} constructor
<span class='line'>4899</span>  * @description
<span class='line'>4900</span>  * This method can issue a certificate by a simple
<span class='line'>4901</span>  * JSON object.
<span class='line'>4902</span>  * Signature value will be provided by signing with
<span class='line'>4903</span>  * private key using 'cakey' parameter or
<span class='line'>4904</span>  * hexadecimal signature value by 'sighex' parameter.
<span class='line'>4905</span>  * &lt;br/>
<span class='line'>4906</span>  * NOTE: Algorithm parameter of AlgorithmIdentifier will
<span class='line'>4907</span>  * be set automatically by default. 
<span class='line'>4908</span>  * (see {@link KJUR.asn1.x509.AlgorithmIdentifier})
<span class='line'>4909</span>  * from jsrsasign 7.1.1 asn1x509 1.0.20.
<span class='line'>4910</span>  * &lt;br/>
<span class='line'>4911</span>  * NOTE2: 
<span class='line'>4912</span>  * RSA-PSS algorithm has been supported from jsrsasign 8.0.21.
<span class='line'>4913</span>  * As for RSA-PSS signature algorithm names and signing parameters 
<span class='line'>4914</span>  * such as MGF function and salt length, please see
<span class='line'>4915</span>  * {@link KJUR.asn1.x509.AlgorithmIdentifier} class.
<span class='line'>4916</span>  *
<span class='line'>4917</span>  * @example
<span class='line'>4918</span>  * var certPEM = KJUR.asn1.x509.X509Util.newCertPEM({
<span class='line'>4919</span>  *   serial: {int: 4},
<span class='line'>4920</span>  *   sigalg: {name: 'SHA1withECDSA'},
<span class='line'>4921</span>  *   issuer: {str: '/C=US/O=a'},
<span class='line'>4922</span>  *   notbefore: {'str': '130504235959Z'},
<span class='line'>4923</span>  *   notafter: {'str': '140504235959Z'},
<span class='line'>4924</span>  *   subject: {str: '/C=US/O=b'},
<span class='line'>4925</span>  *   sbjpubkey: pubKeyObj,
<span class='line'>4926</span>  *   ext: [
<span class='line'>4927</span>  *     {basicConstraints: {cA: true, critical: true}},
<span class='line'>4928</span>  *     {keyUsage: {bin: '11'}},
<span class='line'>4929</span>  *   ],
<span class='line'>4930</span>  *   cakey: prvKeyObj
<span class='line'>4931</span>  * });
<span class='line'>4932</span>  * // -- or --
<span class='line'>4933</span>  * var certPEM = KJUR.asn1.x509.X509Util.newCertPEM({
<span class='line'>4934</span>  *   serial: {int: 4},
<span class='line'>4935</span>  *   sigalg: {name: 'SHA1withECDSA'},
<span class='line'>4936</span>  *   issuer: {str: '/C=US/O=a'},
<span class='line'>4937</span>  *   notbefore: {'str': '130504235959Z'},
<span class='line'>4938</span>  *   notafter: {'str': '140504235959Z'},
<span class='line'>4939</span>  *   subject: {str: '/C=US/O=b'},
<span class='line'>4940</span>  *   sbjpubkey: pubKeyPEM,
<span class='line'>4941</span>  *   ext: [
<span class='line'>4942</span>  *     {basicConstraints: {cA: true, critical: true}},
<span class='line'>4943</span>  *     {keyUsage: {bin: '11'}},
<span class='line'>4944</span>  *   ],
<span class='line'>4945</span>  *   cakey: [prvkey, pass]}
<span class='line'>4946</span>  * );
<span class='line'>4947</span>  * // -- or --
<span class='line'>4948</span>  * var certPEM = KJUR.asn1.x509.X509Util.newCertPEM({
<span class='line'>4949</span>  *   serial: {int: 1},
<span class='line'>4950</span>  *   sigalg: {name: 'SHA1withRSA'},
<span class='line'>4951</span>  *   issuer: {str: '/C=US/O=T1'},
<span class='line'>4952</span>  *   notbefore: {'str': '130504235959Z'},
<span class='line'>4953</span>  *   notafter: {'str': '140504235959Z'},
<span class='line'>4954</span>  *   subject: {str: '/C=US/O=T1'},
<span class='line'>4955</span>  *   sbjpubkey: pubKeyObj,
<span class='line'>4956</span>  *   sighex: '0102030405..'
<span class='line'>4957</span>  * });
<span class='line'>4958</span>  * // for the issuer and subject field, another
<span class='line'>4959</span>  * // representation is also available
<span class='line'>4960</span>  * var certPEM = KJUR.asn1.x509.X509Util.newCertPEM({
<span class='line'>4961</span>  *   serial: {int: 1},
<span class='line'>4962</span>  *   sigalg: {name: 'SHA256withRSA'},
<span class='line'>4963</span>  *   issuer: {C: "US", O: "T1"},
<span class='line'>4964</span>  *   notbefore: {'str': '130504235959Z'},
<span class='line'>4965</span>  *   notafter: {'str': '140504235959Z'},
<span class='line'>4966</span>  *   subject: {C: "US", O: "T1", CN: "http://example.com/"},
<span class='line'>4967</span>  *   sbjpubkey: pubKeyObj,
<span class='line'>4968</span>  *   sighex: '0102030405..'
<span class='line'>4969</span>  * });
<span class='line'>4970</span>  */</span><span class="WHIT">
<span class='line'>4971</span> </span><span class="NAME">KJUR.asn1.x509.X509Util.newCertPEM</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>4972</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4973</span> </span><span class="WHIT">	</span><span class="NAME">_TBSCertificate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.TBSCertificate</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>4974</span> </span><span class="WHIT">	</span><span class="NAME">_Certificate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.Certificate</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4975</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">cert</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Certificate</span><span class="PUNC">(</span><span class="NAME">param</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4976</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">cert.getPEM</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4977</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>4978</span> 
<span class='line'>4979</span> </span></pre></body></html>